lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> Example:

> Lol={}
> Lol.Write={}
> Lol.Write.Version=001
> print(Lol.Write.Version) --> print expected 1
> Name='Write'
> print(getglobal('Lol.'..Name..'.Version')) --> print nil ???

Maybe I'm being dense, but what's wrong with:


Is it that Name might be a hierarchical (i.e. a series of tokens separated
by ".")?

If so, I would just not worry about it. The hash lookup will work just as
well on strings with dots in them as with strings without dots.