Matching is determined using the same rules as for string match . If pattern is a qualified name, the resulting list of command names has each one qualified with the name of the specified namespace. If arg doesn't have a default value then the command returns 0 . Otherwise it returns 1 and places the default value of arg into variable varname . If pattern isn't specified, returns a list of all the names of currently-defined global variables.
Global variables are variables in the global namespace.
If pattern is specified, only those names matching pattern are returned. Matching is determined using the same rules as for string match . If number is specified, then the result is a list con- sisting of the name and arguments for the procedure call at level number on the stack. See the uplevel command for more information on what stack levels mean. See the tclvars manual entry for more information.