Next: Expressions
Up: Tcl: A Generic
Previous: Scripts
- Syntax: $varName
-
- varName is a sequence of letters, digits, underscores.
- May occur anywhere in a word; use ${varName}
to delimit if necessary.
- 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