Since manual doesnt mention how
RemoveItem() command reacts to empty table, I am checking this to make sure it is safe to do so.
When I do:
Code: Select all
mytable={}
InsertItem(mytable, 2)
item1 = RemoveItem(mytable)
item2 = RemoveItem(mytable)
item3 = RemoveItem(mytable)
DebugPrint(item1)
DebugPrint(item2)
DebugPrint(item3)
It simply returns NIL on item2 and item3 cases, which are
RemoveItem() on an empty table, meaning I could keep removing stuff from the table and keep waiting for it to return NIL to see that all the items from it have been removed.
But since this is not commented on
RemoveItem() documentation, is this actually a safe way to do it?