lua-users home
lua-l archive

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


Jilani Khaldi wrote:

> When I use the function "getglobals()"

There is no getglobals() or globals() function in Lua.  To
access global values use the global variable _G:

Lua 5.0.2  Copyright (C) 1994-2004 Tecgraf, PUC-Rio
> foo = "Hello!"
> print(_G.foo)
Hello!
>

(In certain cases you may need to use getfenv().)

-- 
Aaron