listfromarray.bmx 376 B

1234567891011121314151617181920
  1. SuperStrict
  2. Framework Brl.LinkedList
  3. Import Brl.StandardIO
  4. ' create an array holding some objects
  5. Local objects:Object[] = ["one", "two", "three"]
  6. ' create a linked list out of the elements
  7. Local list:TList = ListFromArray(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