Description: declare or access global variables
Syntax: global varname ?varname ...?
Argument: variable name(s )
Returns: text string with a list of values, with spaces between elements
See Also: namespace, proc, variable
This command is ignored unless a Tcl procedure is being interpreted. If so then it declares the given varname’s to be global variables rather than local ones. Global variables are variables in the global namespace. For the duration of the current procedure (and only while executing in the current procedure), any reference to any of the varnames will refer to the global variable by the same name.