next()

next (table [, index]) Allows a program to traverse all fields of a table. Its first argument is a table and its second argument is an index in this table. next returns the next index of the table and its associated value. When called with nil as its second argument, next returns an initial index and its associated value. When called with the last index, or with nil in an empty table, next returns nil. If the second argument is absent, then it is interpreted as nil. In particular, you can use

lua_Integer

lua_Integer typedef ... lua_Integer; The type of integers in Lua. By default this type is long long, (usually a 64-bit two-complement integer), but that can be changed to long or int (usually a 32-bit two-complement integer). (See LUA_INT_TYPE in luaconf.h.) Lua also defines the constants LUA_MININTEGER and LUA_MAXINTEGER, with the minimum and the maximum values that fit in this type.

lua_isuserdata

lua_isuserdata[-0, +0, –] int lua_isuserdata (lua_State *L, int index); Returns 1 if the value at the given index is a userdata (either full or light), and 0 otherwise.

math.floor()

math.floor (x) Returns the largest integral value smaller than or equal to x.

table.concat()

table.concat (list [, sep [, i [, j]]]) Given a list where all elements are strings or numbers, returns the string list[i]..sep..list[i+1] ··· sep..list[j]. The default value for sep is the empty string, the default for i is 1, and the default for j is #list. If i is greater than j, returns the empty string.

lua_rawequal

lua_rawequal[-0, +0, –] int lua_rawequal (lua_State *L, int index1, int index2); Returns 1 if the two values in indices index1 and index2 are primitively equal (that is, without calling the __eq metamethod). Otherwise returns 0. Also returns 0 if any of the indices are not valid.

os.difftime()

os.difftime (t2, t1) Returns the difference, in seconds, from time t1 to time t2 (where the times are values returned by os.time). In POSIX, Windows, and some other systems, this value is exactly t2-t1.

lua_pushnil

lua_pushnil[-0, +1, –] void lua_pushnil (lua_State *L); Pushes a nil value onto the stack.

luaL_requiref

luaL_requiref[-0, +1, e] void luaL_requiref (lua_State *L, const char *modname, lua_CFunction openf, int glb); If modname is not already present in package.loaded, calls function openf with string modname as an argument and sets the call result in package.loaded[modname], as if that function has been called through require. If glb is true, also stores the module into global modname. Leaves a copy of the module on the stack.

luaL_checkstack

luaL_checkstack[-0, +0, v] void luaL_checkstack (lua_State *L, int sz, const char *msg); Grows the stack size to top + sz elements, raising an error if the stack cannot grow to that size. msg is an additional text to go into the error message (or NULL for no additional text).