[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to use getglobals()?
- From: "Aaron Brown" <aaron-lua@...>
- Date: Fri, 24 Sep 2004 17:11:07 -0400
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