tobjectlist_fromarray.bmx 390 B

1234567891011121314151617181920
  1. SuperStrict
  2. Framework Brl.ObjectList
  3. Import Brl.StandardIO
  4. ' create an array holding some objects
  5. Local objects:Object[] = ["one", "two", "three"]
  6. ' create a object list out of the elements
  7. Local list:TObjectList = TObjectList.FromArray(objects)
  8. ' enumerate all the strings in the list
  9. For Local a:String = EachIn list
  10. Print a
  11. Next
  12. ' outputs:
  13. ' one
  14. ' two
  15. ' three