[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: linked variable
- From: "wang xu" <xu4wang@...>
- Date: Sat, 2 Dec 2006 02:12:50 +0800
The lua demo is cool! I'll not do it in C.
I think this mail should be in plain ascii, thanks for the reminder.
On 02/12/06, Rici Lake <firstname.lastname@example.org> wrote:
1) Actually, lua_getglobal does not do . resolution.
2) However, there is an undocumented interface in lauxlib,
luaL_findtable(). This doesn't actually do what you want either, but it
shows how you might write such a function in c.
In Lua, it's pretty easy:
function getdotted(field, start)
start = start or _G
for k in field:gmatch"[^.]+" do
start = start[k]
if start == nil then break end
3) Please figure out how to turn off HTML mail for list submissions
4) Sorry for top-posting