LuaNET, the lua 5.1 api documentation!

Lua-Api

Debug

[LUA 5.1] debug.getlocal

function debug.getlocal ( thread, level, local )
This function returns the name and the value of the local variable
with index
Code:
local
of the function at level
Code:
level
of the stack.
(The first parameter or local variable has index 1, and so on,
until the last active local variable.)
The function returns nil if there is no local
variable with the given index,
and raises an error when called with a
Code:
level
out of range.
(You can call
Code:
debug.getinfo
to check whether the level is valid.)



Variable names starting with '
Code:
(
' (open parentheses)
represent internal variables
(loop control variables, temporaries, and C function locals).

Comments

© 2007 DracoBlue :: Valid XHTML, CSS, RSS Powered by SMF 1.1.5 | SMF © 2006-2008, Simple Machines LLC | SourceNet © 2007, DracoBlue :: Page created in 0.053 seconds with 19 queries.