lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


A global variable (not a function) that holds the global environment (see §2.2). Lua itself does not use this variable; changing its value does not affect any environment, nor vice-versa. 

The above is still confusing, what is it used for? And why is it there at all?

On Mon, May 7, 2012 at 7:39 AM, Craig Barnes <craigbarnes85@gmail.com> wrote:
On 7 May 2012 06:04, Emeka <emekamicro@gmail.com> wrote:
> However, I have a question, what is _G? And, why is it empty when I try it
> on the shell?
>
> Regards, \Emeka

See: http://www.lua.org/manual/5.2/manual.html#pdf-_G




--
Satajanus  Nig. Ltd