e = RemoveItem(list[, pos])
list
and returns it. If you omit
the optional argument pos
, the last item of the list will be removed.
Otherwise the specified item is removed. Position 0 specifies the first
item of the list. After removing the item, the list is reorganized to
close the gap.
Note that this function is rather slow when used with normal Hollywood
tables. To accelerate RemoveItem()
, you have to use it with optimized
lists created by CreateList(). See CreateList for details.
a = {1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 10} e = RemoveItem(a, 7) For k = 1 To ListItems(a) Do Print(a[k - 1] .. " ")Removes the number 8 because it is twice in the list. The variable e will receive the value 8. After removing the item, the correct row will be printed: "1 2 3 4 5 6 7 8 9 10".