Introduction
Basic Concepts
Values and Types
Environments and the Global Environment
Error Handling
Metatables and Metamethods
Garbage Collection
Incremental Garbage Collection
Generational Garbage Collection
Garbage-Collection Metamethods
Weak Tables
Coroutines
The Language
Lexical Conventions
Variables
Statements
Blocks
Chunks
Assignment
Control Structures
For Statement
Function Calls as Statements
Local Declarations
To-be-closed Variables
Expressions
Arithmetic Operators
Bitwise Operators
Coercions and Conversions
Relational Operators
Logical Operators
Concatenation
The Length Operator
Precedence
Table Constructors
Function Calls
Function Definitions
Visibility Rules
The Application Program Interface
The Stack
Stack Size
Valid and Acceptable Indices
Pointers to strings
C Closures
Registry
Error Handling in C
Status Codes
Handling Yields in C
Functions and Types
lua_absindex
lua_Alloc
lua_arith
lua_atpanic
lua_call
lua_callk
lua_CFunction
lua_checkstack
lua_close
lua_closeslot
lua_closethread
lua_compare
lua_concat
lua_copy
lua_createtable
lua_dump
lua_error
lua_gc
lua_getallocf
lua_getfield
lua_getextraspace
lua_getglobal
lua_geti
lua_getmetatable
lua_gettable
lua_gettop
lua_getiuservalue
lua_insert
lua_Integer
lua_isboolean
lua_iscfunction
lua_isfunction
lua_isinteger
lua_islightuserdata
lua_isnil
lua_isnone
lua_isnoneornil
lua_isnumber
lua_isstring
lua_istable
lua_isthread
lua_isuserdata
lua_isyieldable
lua_KContext
lua_KFunction
lua_len
lua_load
lua_newstate
lua_newtable
lua_newthread
lua_newuserdatauv
lua_next
lua_Number
lua_numbertointeger
lua_pcall
lua_pcallk
lua_pop
lua_pushboolean
lua_pushcclosure
lua_pushcfunction
lua_pushfstring
lua_pushglobaltable
lua_pushinteger
lua_pushlightuserdata
lua_pushliteral
lua_pushlstring
lua_pushnil
lua_pushnumber
lua_pushstring
lua_pushthread
lua_pushvalue
lua_pushvfstring
lua_rawequal
lua_rawget
lua_rawgeti
lua_rawgetp
lua_rawlen
lua_rawset
lua_rawseti
lua_rawsetp
lua_Reader
lua_register
lua_remove
lua_replace
lua_resetthread
lua_resume
lua_rotate
lua_setallocf
lua_setfield
lua_setglobal
lua_seti
lua_setiuservalue
lua_setmetatable
lua_settable
lua_settop
lua_setwarnf
lua_State
lua_status
lua_stringtonumber
lua_toboolean
lua_tocfunction
lua_toclose
lua_tointeger
lua_tointegerx
lua_tolstring
lua_tonumber
lua_tonumberx
lua_topointer
lua_tostring
lua_tothread
lua_touserdata
lua_type
lua_typename
lua_Unsigned
lua_upvalueindex
lua_version
lua_WarnFunction
lua_warning
lua_Writer
lua_xmove
lua_yield
lua_yieldk
The Debug Interface
lua_Debug
lua_gethook
lua_gethookcount
lua_gethookmask
lua_getinfo
lua_getlocal
lua_getstack
lua_getupvalue
lua_Hook
lua_sethook
lua_setlocal
lua_setupvalue
lua_upvalueid
lua_upvaluejoin
The Auxiliary Library
luaL_addchar
luaL_addgsub
luaL_addlstring
luaL_addsize
luaL_addstring
luaL_addvalue
luaL_argcheck
luaL_argerror
luaL_argexpected
luaL_Buffer
luaL_buffaddr
luaL_buffinit
luaL_bufflen
luaL_buffinitsize
luaL_buffsub
luaL_callmeta
luaL_checkany
luaL_checkinteger
luaL_checklstring
luaL_checknumber
luaL_checkoption
luaL_checkstack
luaL_checkstring
luaL_checktype
luaL_checkudata
luaL_checkversion
luaL_dofile
luaL_dostring
luaL_error
luaL_execresult
luaL_fileresult
luaL_getmetafield
luaL_getmetatable
luaL_getsubtable
luaL_gsub
luaL_len
luaL_loadbuffer
luaL_loadbufferx
luaL_loadfile
luaL_loadfilex
luaL_loadstring
luaL_newlib
luaL_newlibtable
luaL_newmetatable
luaL_newstate
luaL_openlibs
luaL_opt
luaL_optinteger
luaL_optlstring
luaL_optnumber
luaL_optstring
luaL_prepbuffer
luaL_prepbuffsize
luaL_pushfail
luaL_pushresult
luaL_pushresultsize
luaL_ref
luaL_Reg
luaL_requiref
luaL_setfuncs
luaL_setmetatable
luaL_Stream
luaL_testudata
luaL_tolstring
luaL_traceback
luaL_typeerror
luaL_typename
luaL_unref
luaL_where
The Standard Libraries
Basic Functions
assert
collectgarbage
dofile
error
_G
getmetatable
ipairs
load
loadfile
next
pairs
pcall
print
rawequal
rawget
rawlen
rawset
select
setmetatable
tonumber
tostring
type
_VERSION
warn
xpcall
Coroutine Manipulation
coroutine.close
coroutine.create
coroutine.isyieldable
coroutine.resume
coroutine.running
coroutine.status
coroutine.wrap
coroutine.yield
Modules
require
package.config
package.cpath
package.loaded
package.loadlib
package.path
package.preload
package.searchers
package.searchpath
String Manipulation
string.byte
string.char
string.dump
string.find
string.format
string.gmatch
string.gsub
string.len
string.lower
string.match
string.pack
string.packsize
string.rep
string.reverse
string.sub
string.unpack
string.upper
Patterns
Format Strings for Pack and Unpack
UTF-8 Support
utf8.char
utf8.charpattern
utf8.codes
utf8.codepoint
utf8.len
utf8.offset
Table Manipulation
table.concat
table.insert
table.move
table.pack
table.remove
table.sort
table.unpack
Mathematical Functions
math.abs
math.acos
math.asin
math.atan
math.ceil
math.cos
math.deg
math.exp
math.floor
math.fmod
math.huge
math.log
math.max
math.maxinteger
math.min
math.mininteger
math.modf
math.pi
math.rad
math.random
math.randomseed
math.sin
math.sqrt
math.tan
math.tointeger
math.type
math.ult
Input and Output Facilities
io.close
io.flush
io.input
io.lines
io.open
io.output
io.popen
io.read
io.tmpfile
io.type
io.write
file:close
file:flush
file:lines
file:read
file:seek
file:setvbuf
file:write
Operating System Facilities
os.clock
os.date
os.difftime
os.execute
os.exit
os.getenv
os.remove
os.rename
os.setlocale
os.time
os.tmpname
The Debug Library
debug.debug
debug.gethook
debug.getinfo
debug.getlocal
debug.getmetatable
debug.getregistry
debug.getupvalue
debug.getuservalue
debug.sethook
debug.setlocal
debug.setmetatable
debug.setupvalue
debug.setuservalue
debug.traceback
debug.upvalueid
debug.upvaluejoin
Lua Standalone
Incompatibilities with the Previous Version
Incompatibilities in the Language
Incompatibilities in the Libraries
Incompatibilities in the API
The Complete Syntax of Lua
Barracuda Manual