Difference between revisions of "(global)"

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

Methods

assert Template:Error if v nil or false, otherwise returns v
collectgarbage Template:Opts: stop, restart, collect, count, step, setpause, setstepmul
dofile Template:Executes as Lua chunk, default stdin, returns value
error Template:Terminates protected func, never returns
getfenv Template:Gets env, f can be a function or number(stack level)
getmetatable Template:Returns metatable of given object, otherwise nil
ipairs Template:Returns an iterator function, table t and 0
loadfile Template:Loads chunk without execution, returns chunk as function, else nil plus error
loadstring Template:Loads string as chunk, returns chunk as function, else nil plus error
next Template:Returns next index,value pair, if index=nil(default-, returns first index
pairs Template:Returns the next function and table t plus a nil, iterates over all key-value pairs
pcall Template:Protected mode call, catches errors, returns status code first
print Template:Prints values to stdout using tostring
rawequal Template:Non-metamethod v1==v2, returns boolean
rawget {{non-metamethod get value of table[index], index != nil}}
rawset {{non-metamethod set value of table[index], index != nil}}
require Template:Loads package, updates LOADED, returns boolean
setfenv Template:Sets env, f can be a function or number(stack level, default=1-, 0=global env
setmetatable Template:Sets metatable, nil to remove metatable
tonumber {{convert to number, returns number, nil if non-convertible, 2<=base<=36}}
tostring Template:Convert to string, returns string
type Template:Returns type of v as a string
unpack Template:Returns all elements from list
xpcall Template:Pcall function f with new error handler err

Events

Constants

_G
_VERSION