[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "Stringizing" a variable name
- From: Tom <tom7ca@...>
- Date: Thu, 11 Apr 2002 19:53:13 -0700 (PDT)
for k,v in globals() do
print(k .. "= " .. type(v))
Note that once the value of the variable has been bound to "i",
its original name is lost. That's the way almost all programming
languages work these days (including C++).
--- simonhaines <firstname.lastname@example.org> wrote:
> I'm trying to find the Lua counterpart for the C++ '#' directive (turn
> a variable name into a string). Is there one? Such that:
> g = globals()
> foreach(g, function(i, v) print( *stringize(i)* .."= "..type(v)))
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax