Register forum user name Search FAQ

table.setn

Summary

Sets the size of a table (obsolete)

Prototype

table.setn (t, n)


Description

This has been removed from Lua 5.1. Attempting to call it will raise an error. The length of a table can not be set, it is implied by the highest numeric key, providing there are no gaps in the sequence of numeric keys.


See Also ...

Lua functions

table.concat - Concatenates table items together into a string
table.foreach - Applies a function to each item in a table
table.foreachi - Applies a function to each item in a numerically-keyed table
table.getn - Returns the size of a numerically-keyed table
table.insert - Inserts a new item into a numerically-keyed table
table.maxn - Returns the highest numeric key in the table
table.remove - Removes an item from a numerically-keyed table
table.sort - Sorts a table

Topics

Lua base functions
Lua bc (big number) functions
Lua bit manipulation functions
Lua coroutine functions
Lua debug functions
Lua io functions
Lua LPEG library
Lua math functions
Lua os functions
Lua package functions
Lua PCRE regular expression functions
Lua script extensions
Lua string functions
Lua syntax
Lua table functions
Lua utilities
Scripting
Scripting callbacks - plugins

(Help topic: lua=table.setn)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.