Difference between revisions of "(global)"
From GiderosMobile
Line 7: | Line 7: | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Methods === | === Methods === | ||
− | [[assert]] | + | [[assert]] {{<translate>error if v nil or false, otherwise returns v</translate>}}<br/> |
− | [[collectgarbage]] | + | [[collectgarbage]] {{<translate>opts: stop, restart, collect, count, step, setpause, setstepmul</translate>}}<br/> |
− | [[dofile]] | + | [[dofile]] {{<translate>executes as Lua chunk, default stdin, returns value</translate>}}<br/> |
− | [[error]] | + | [[error]] {{<translate>terminates protected func, never returns</translate>}}<br/> |
− | [[getfenv]] | + | [[getfenv]] {{<translate>gets env, f can be a function or number(stack level)</translate>}}<br/> |
− | [[getmetatable]] | + | [[getmetatable]] {{<translate>returns metatable of given object, otherwise nil</translate>}}<br/> |
− | [[ipairs]] | + | [[ipairs]] {{<translate>returns an iterator function, table t and 0</translate>}}<br/> |
− | [[loadfile]] | + | [[loadfile]] {{<translate>loads chunk without execution, returns chunk as function, else nil plus error</translate>}}<br/> |
− | [[loadstring]] | + | [[loadstring]] {{<translate>loads string as chunk, returns chunk as function, else nil plus error</translate>}}<br/> |
− | [[next]] | + | [[next]] {{<translate>returns next index,value pair, if index=nil(default-, returns first index</translate>}}<br/> |
− | [[pairs]] | + | [[pairs]] {{<translate>returns the next function and table t plus a nil, iterates over all key-value pairs</translate>}}<br/> |
− | [[pcall]] | + | [[pcall]] {{<translate>protected mode call, catches errors, returns status code first</translate>}}<br/> |
− | [[print]] | + | [[print]] {{<translate>prints values to stdout using tostring</translate>}}<br/> |
− | [[rawequal]] | + | [[rawequal]] {{<translate>non-metamethod v1==v2, returns boolean</translate>}}<br/> |
− | [[rawget]] | + | [[rawget]] {{<translate>non-metamethod get value of table[index], index != nil</translate>}}<br/> |
− | [[rawset]] | + | [[rawset]] {{<translate>non-metamethod set value of table[index], index != nil</translate>}}<br/> |
− | [[require]] | + | [[require]] {{<translate>loads package, updates _LOADED, returns boolean</translate>}}<br/> |
− | [[setfenv]] | + | [[setfenv]] {{<translate>sets env, f can be a function or number(stack level, default=1-, 0=global env</translate>}}<br/> |
− | [[setmetatable]] | + | [[setmetatable]] {{<translate>sets metatable, nil to remove metatable</translate>}}<br/> |
− | [[tonumber]] | + | [[tonumber]] {{<translate>convert to number, returns number, nil if non-convertible, 2<=base<=36</translate>}}<br/> |
− | [[tostring]] | + | [[tostring]] {{<translate>convert to string, returns string</translate>}}<br/> |
− | [[type]] | + | [[type]] {{<translate>returns type of v as a string</translate>}}<br/> |
− | [[unpack]] | + | [[unpack]] {{<translate>returns all elements from list</translate>}}<br/> |
− | [[xpcall]] | + | [[xpcall]] {{<translate>pcall function f with new error handler err</translate>}}<br/> |
| style="width: 50%;"| | | style="width: 50%;"| | ||
=== Events === | === Events === |
Revision as of 14:17, 23 August 2018
Supported platforms: android, ios, mac, pc
Available since: Gideros 2011.6
Description
Global scope of Lua environment