arrays_03.bmx 504 B

1234567891011121314151617181920212223242526272829
  1. SuperStrict
  2. Framework brl.standardio
  3. Type Base
  4. Field name:String="Base"
  5. End Type
  6. Type Other
  7. Field name:String="Other"
  8. End Type
  9. Function CollectObjects:Int(obj:Object[])
  10. Print "got "+obj.length+" objects"
  11. End Function
  12. Local baseA:Base = New Base
  13. Local baseB:Base = New Base
  14. Local otherA:Other = New Other
  15. Local otherB:Other = New Other
  16. Local bases:Base[] = [baseA, baseB]
  17. Local others:Other[] = [otherA, otherB]
  18. CollectObjects(bases + others) 'prints 4