Lua base functions and variables
These are the "base" functions in Lua (that is, those that are not in library tables).
_G
Variable which is the global environment table. (_G._G == _G)
You cannot change the environment by assigning to _G, use setfenv instead.
_VERSION
A global variable that is a string containing the current Lua interpreter version.
print (_VERSION) --> Lua 5.1
Lua functions
 assert - Asserts that condition is not nil and not false
assert - Asserts that condition is not nil and not false
 collectgarbage - Collects garbage
collectgarbage - Collects garbage
 dofile - Executes a Lua file
dofile - Executes a Lua file
 error - Raises an error message
error - Raises an error message
 gcinfo - Returns amount of dynamic memory in use
gcinfo - Returns amount of dynamic memory in use
 getfenv - Returns the current environment table
getfenv - Returns the current environment table
 getmetatable - Returns the metatable for the object
getmetatable - Returns the metatable for the object
 ipairs - Iterates over a numerically keyed table
ipairs - Iterates over a numerically keyed table
 load - Loads a chunk by calling a function repeatedly
load - Loads a chunk by calling a function repeatedly
 loadfile - Loads a Lua file and parses it
loadfile - Loads a Lua file and parses it
 loadlib - Loads a DLL (obsolete in Lua 5.1)
loadlib - Loads a DLL (obsolete in Lua 5.1)
 loadstring - Compiles a string of Lua code
loadstring - Compiles a string of Lua code
 module - Creates a Lua module
module - Creates a Lua module
 next - Returns next key / value pair in a table
next - Returns next key / value pair in a table
 pairs - Traverse all items in a table
pairs - Traverse all items in a table
 pcall - Calls a function in protected mode
pcall - Calls a function in protected mode
 print - Prints its arguments
print - Prints its arguments
 rawequal - Compares two values for equality without invoking metamethods
rawequal - Compares two values for equality without invoking metamethods
 rawget - Gets the value of a table item without invoking metamethods
rawget - Gets the value of a table item without invoking metamethods
 rawset - Sets the value of a table item without invoking metamethods
rawset - Sets the value of a table item without invoking metamethods
 require - Loads a module
require - Loads a module
 select - Returns items in a list
select - Returns items in a list
 setfenv - Sets a function's environment
setfenv - Sets a function's environment
 setmetatable - Sets the metatable for a table
setmetatable - Sets the metatable for a table
 tonumber - Converts a string (of the given base) to a number
tonumber - Converts a string (of the given base) to a number
 tostring - Converts its argument to a string
tostring - Converts its argument to a string
 type - Returns the type of a variable
type - Returns the type of a variable
 unpack - Unpacks a table into individual items
unpack - Unpacks a table into individual items
 xpcall - Calls a function with a custom error handler
xpcall - Calls a function with a custom error handler
Topics
 Lua bc (big number) functions
Lua bc (big number) functions
 Lua bit manipulation functions
Lua bit manipulation functions
 Lua coroutine functions
Lua coroutine functions
 Lua debug functions
Lua debug functions
 Lua io functions
Lua io functions
 Lua math functions
Lua math functions
 Lua os functions
Lua os functions
 Lua package functions
Lua package functions
 Lua PCRE regular expression functions
Lua PCRE regular expression functions
 Lua script extensions
Lua script extensions
 Lua string functions
Lua string functions
 Lua syntax
Lua syntax
 Lua table functions
Lua table functions
 Lua utilities
Lua utilities
 Scripting
Scripting
 Scripting callbacks - plugins
Scripting callbacks - plugins
(Help topic: general=lua_base)