3.2 The build-up of a TCL script
The commands of a TCL script can roughly be divided into two parts. The first part is executed when you run
the script and the other part is executed when you call upon it.
Commands which are executed when the script starts are outside a procedure (I'll explain later on how you
can define procedures).
In a TCL script are (in general) multiple procedures. The commands within these
procedures are only executed when the procedure is triggered.
A procedure can be triggered in two ways, either by calling
upon it yourself or when an event is triggered that's bound
to the procedure.
|