tobjectlist_isempty.bmx 451 B

1234567891011121314151617181920212223
  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 end of the list
  7. list.AddLast("one")
  8. list.AddLast("two")
  9. list.AddLast("three")
  10. ' check if the list contains some elements
  11. If list.IsEmpty() Then
  12. Print "list is empty"
  13. Else
  14. Print "list contains elements"
  15. EndIf
  16. ' outputs:
  17. ' list contains elements