Table.remove

From OpenEUO
Revision as of 18:35, 7 October 2010 by 76.184.213.234 (Talk) (Created page with " table.remove (table [, pos]) Removes from table the element at position pos, shifting down other elements to close the space, if necessary. Returns the value of the removed ele...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
table.remove (table [, pos])

Removes from table the element at position pos, shifting down other elements to close the space, if necessary. Returns the value of the removed element. The default value for pos is n, where n is the length of the table, so that a call table.remove(t) removes the last element of table t. Note that the tables store values in no particular order, so be sure you really want the 'last element' removed!