tobjectlist_removefirst.bmx 458 B

123456789101112131415161718192021222324
  1. SuperStrict
  2. Framework Brl.ObjectList
  3. Import Brl.StandardIO
  4. ' create an object list to hold some objects
  5. Local list:TObjectList = New TObjectList
  6. ' add some string objects to the begin of the list
  7. list.AddLast("one")
  8. list.AddLast("two")
  9. list.AddLast("three")
  10. ' remove the first element of the list
  11. list.RemoveFirst()
  12. ' enumerate all the strings in the list
  13. For Local a:String = EachIn list
  14. Print a
  15. Next
  16. ' outputs:
  17. ' two
  18. ' three