next up previous
Next: Command Substitution Up: Tcl: A Generic Previous: Variable Substitution

Expressions

Syntax: expr Sequence of Words
Examples:
set b 5

5
expr ($b*4) - 3

17
expr $b <= 2

0
expr $a * cos(2*$b)

-5.03443



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

cs488@cgl.uwaterloo.ca