Type Library
Revision 2017.3077
Keywords global, globals


The (globals) section covers basic functions of Lua 5.1 which is the underlying programming language of Corona SDK. All of the functions and objects listed below can be called as is (without a prefix). For example:

globals.rawget()  -- incorrect; will produce an error
rawget()          -- correct

The Global Variable

_G is a global variable (not a function) that holds the global environment, that is, _G._G = _G. Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. Use setfenv() to change environments.