lua-users home
lua-l archive

Re: Turning a string into a variable

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


> Let's say:
> 
> x = "foo"
> 
> But now I want to see if foo itself is an assigned variable (i.e. foo
> ~= nil --- but since I don't know the sting contained in x, I can't
> do this directly) 
Try getglobal(x).
AH.

AltStyle によって変換されたページ (->オリジナル) /