Tcl evaluates variables within a scope delineated by procs, namespaces (see Building reusable libraries - packages and namespaces), and at the topmost level, the global scope. The scope in which a variable will be evaluated can be changed with the global and upvar commands.
The global command will cause a variable in a local scope (inside a procedure) to refer to the global variable of that name. The upvar command is similar.
It "ties" the name of a variable in the current scope to a variable in...
#
0