Node:Variable substitution, Next:, Previous:Syntax (Tcl), Up:Syntax (Tcl)



Variable substitution

Variable substitution happens when a $ prefixed word is found in a command. There are three types of variable substitution:

An example of variable substitution is:

     set a 1
     set b $a
     

which sets the value of variable a to 1, and then sets the value of variable b to the value of variable a.