LUA_SETLOCAL(3) | Library Functions Manual | LUA_SETLOCAL(3) |
lua_setlocal
—
sets the value of a local variable of a given activation
record, function indicator [- (0|1), +0, -]
#include
<lua.h>
const char *
lua_setlocal
(lua_State
*L, lua_Debug *ar,
int n);
lua_setlocal
()
sets the value of a local variable of a given activation record. Parameters
ar and n are as in
lua_getlocal(3). lua_setlocal
()
assigns the value at the top of the stack to the variable and returns its
name. It also pops the value from the stack.
Returns NULL
(and pops nothing) when the
index is greater than the number of active local variables.
Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.
The lua_setlocal
() manual page is based on
Lua Reference Manual 5.1 and was created by Sergey Bronnikov.
July 13, 2022 | Debian |