global.3tcl

Langue: en

Version: 267622 (debian - 07/07/09)

Section: 3 (Bibliothèques de fonctions)


 

NAME

global - Access global variables

SYNOPSIS

global varname ?varname ...?
 

 
 

DESCRIPTION

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.

Please note that this is done by creating local variables that are linked to the global variables, and therefore that these variables will be listed by info locals like all other local variables.

SEE ALSO

namespace(3tcl), upvar(3tcl), variable(3tcl)

KEYWORDS

global, namespace, procedure, variable