-- * `_G`: Holds global environment, setfenv changes environments. -- * `_VERSION`: Current interpreter version "Lua 5.0". --- Error if v nil or false, otherwise returns v. function assert(v [, message]) --- Set threshold to limit KBytes, default 0, may run GC. function collectgarbage([limit]) --- Executes as Lua chunk, default stdin, returns value. function dofile(filename) --- Terminates protected func, never returns, level 1(default), 2=parent. function error(message [, level]) --- Returns dynamic mem in use(KB), and current GC threshold(KB). function gcinfo() --- -- Gets env, f can be a function or number(stack level, default=1), 0=global -- env. function getfenv(f) --- Returns metatable of given object, otherwise nil. function getmetatable(object) --- Returns an iterator function, table t and 0. function ipairs(t) --- -- Loads chunk without execution, returns chunk as function, else nil plus -- error. function loadfile(filename) --- Links to dynamic library libname, returns funcname as a C function. function loadlib(libname, funcname) --- Loads string as chunk, returns chunk as function, else nil plus error. function loadstring(string [, chunkname]) --- Returns next index,value pair, if index=nil(default), returns first index. function next(table [, index]) --- -- Returns the next function and table t plus a nil, iterates over all key-value -- pairs. function pairs(t) --- -- Protected mode call, catches errors, returns status code first --(true=success). function pcall(f, arg1, arg2, ...) --- Prints values to stdout using tostring. function print(e1, e2, ...) --- Non-metamethod v1==v2, returns boolean. function rawequal(v1, v2) --- Non-metamethod get value of table[index], index != nil. function rawget(table, index) --- Non-metamethod set value of table[index], index != nil. function rawset(table, index, value) --- Loads package, updates _LOADED, returns boolean. function require(packagename) --- -- Sets env, f can be a function or number(stack level, default=1), 0=global -- env. function setfenv(f, table) --- Sets metatable, nil to remove metatable. function setmetatable(table, metatable) --- Convert to number, returns number, nil if non-convertible, 2<=base<=36. function tonumber(e [, base]) --- Convert to string, returns string. function tostring(e) --- Returns type of v as a string. function type(v) --- Returns all elements from list. function unpack(list) --- pcall function f with new error handler err. function xpcall(f, err)