[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: getglobal()
- From: Markus Huber <pulse@...>
- Date: Tue, 5 Feb 2002 02:46:46 +0100 (GMT)
Example:
Lol={}
Lol.Write={}
Lol.Write.Version=001
print(Lol.Write.Version) --> print expected 1
Name='Write'
print(getglobal('Lol.'..Name..'.Version')) --> print nil ???
Needed for Robertos Ierusalimschy library suggestion (simple example):
do
if Lol==nil then Lol={}
local Public,Private={},{}
Lol.Write=Public
function Public.Initialise()
%Public.Version = 001
end
end
As also suggsted by Roberto I wouldn't like to use dostring() instead of
getglobal()
Markus