next up previous
Next: Expressions Up: Tcl: A Generic Previous: Scripts

Variable Substitution

Syntax: $varName
Examples:
set b 66

66
set a b

b
set a $b

66
set a $b.3

66.3
set a $b3

error: no such variable.
set a ${b}3

663



CS488/688: Introduction to Interactive Computer Graphics
University of Waterloo
Computer Graphics Lab

cs488@cgl.uwaterloo.ca