Tao.Lua SDK Documentation

Lua.lua_getlocal Method 

Gets information about a local variable of a given activation record.

[Visual Basic]
Public Shared Function lua_getlocal( _
   ByVal L As IntPtr, _
   ByVal ar As lua_Debug, _
   ByVal n As Integer _
) As String
[C#]
public static string lua_getlocal(
   IntPtr L,
   lua_Debug ar,
   int n
);

Parameters

L
ar
The parameter ar must be a valid activation record that was filled by a previous call to lua_getstack or given as argument to a hook (see lua_Hook).
n
The index n selects which local variable to inspect (1 is the first parameter or active local variable, and so on, until the last active local variable). lua_getlocal pushes the variable's value onto the stack and returns its name.

Return Value

Returns NULL (and pushes nothing) when the index is greater than the number of active local variables.

Remarks

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

See Also

Lua Class | Tao.Lua Namespace