The following functions allow the manipulation of the local variables of a given activation record:
The following functions allow the manipulation of the upvalues of a given function (unlike local variables, the upvalues of a function are accessible even when the function is not active):
As an example, the following function lists the names of all local variables and upvalues for a function at a given level of the stack: