lua-users home
lua-l archive

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

I wrote (pardon my unclosed parenthesis):

> (and not counting the debug library, which might make it
> possible.

Here it is done with the use of the debug library:

local foo = "first value"
local foo = "second value"

print(foo) -- prints "second value"
print(debug.getlocal(1, 2)) -- prints "foo     second value"
print(debug.getlocal(1, 1)) -- prints "foo     first value"

-- Aaron