(globals)

Type Library
Revision Release 2022.3683
Keywords global, globals

Overview

The (globals) section covers basic functions of Lua 5.1 which is the underlying programming language of Solar2D. 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.

Functions

unpack()