[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: linked variable
- From: "wang xu" <xu4wang@...>
- Date: Sat, 2 Dec 2006 00:59:34 +0800
Hello,
If I have a string containing the path to a varialble, for example:
> n1={n2="hello"}
> =n1.n2
hello
> path_to_n2="n1.n2"
> print(path_to_n2)
n1.n2
>
Given variable path_to_n2, how can I get the value of n1.n2 ?
I know if I use C, I can use lua_getglobal(), but if there is a way to do it in pure Lua?
I'm a Lua newbie, sorry if it's a silly question. ;)
Regards,
Xu