Difference between revisions of "Table.insert"

From OpenEUO
Jump to: navigation, search
(Created page with " table.insert (table, [pos,] value) Inserts element value at position pos in table, shifting up other elements to open space, if necessary. The default value for pos is n+1, whe...")
(No difference)

Revision as of 17:31, 7 October 2010

table.insert (table, [pos,] value)

Inserts element value at position pos in table, shifting up other elements to open space, if necessary. The default value for pos is n+1, where n is the length of the table (see §2.5.5), so that a call table.insert(t,x) inserts x at the end of table t.

Lua Manual - The length operator #

Lua Manual - Table Constructors