June 2003
Intermediate to advanced
960 pages
20h 55m
English
Procedures encapsulate a set of commands, and they introduce a local scope for variables. Commands described are: proc, global, and upvar.
Procedures parameterize a commonly used sequence of commands. In addition, each procedure has a new local scope for variables. The scope of a variable is the range of commands over which it is defined. Originally, Tcl had one global scope for shared variables, local scopes within procedures, and one global scope for procedures. Tcl 8.0 added namespaces that provide new scopes for procedures and global variables. For simple applications you can ignore namespaces and just use the global scope. Namespaces are described in Chapter 14.
proc CommandA Tcl procedure is defined with ...
Read now
Unlock full access