[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Starting Lua
- From: RLake@...
- Date: Wed, 28 May 2003 15:23:58 -0500
> is there any way to make a Lua variable reference another variable?
A Lua global is actually a key in the global environment table. So if _G is
the global environment table (which it is if you haven't changed it with
setfenv and you are using the standalone Lua interpreter) then
a
is the same as
_G.a
is the same as
_G["a"]
Hope that helps
"Milking It", Oxfam's first online resource for secondary schools, is now
live. Find out how Oxfam is encouraging young people to learn about trade
and dumping. http://www.oxfam.org.uk/coolplanet/milkingit
Oxfam works with others to find lasting solutions to poverty and suffering.
Oxfam GB is a member of Oxfam International, a company limited by guarantee and registered in England No. 612172.
Registered office: 274 Banbury Road, Oxford OX2 7DZ.
Registered charity No. 202918.
Visit the web site at http://www.oxfam.org.uk