|
Eduardo Ochs wrote:
Tcl has a function "upvar" that gives access to a variable in an outer scope, and a function "uplevel" that runs code in an outer scope.
I was going to mention this, but I think the difference is that Lua uses lexical scope, where Tcl's use of upvar and uplevel is through a procedure call stack frame. Slight difference in semantics, but same general idea of being able to reference things outside of some type of local scope. Ralph