Use Curly braces when the argument contains fixed information. ACTION commands normally need only a single argument enclosed in curly braces. Nesting an ACTION command inside another ACTION command requires the use of Square Brackets. Use Quotes to force the evaluation of a local variable. Brackets are also used to enclose expressions.
For the example,
SETVAL {rotatefan103=%ROTATEPLUS 12}
the tag name, the options
don't change in the above example.
For the example,
SETVAL "position=%ROTATEPLUS $dx"
the speed of rotation changes as the variable dx changes.
For the example,
SETVAL tag1=[GETVAL tag2]
the value of tag1 is set equal to current value of tag2. Tags2 is
read, then passed to SETVAL ACTION command for tag1.
For the example,
set deltat [expr $time2 - $time1]
the value of local variables time2 and time1 are evaluated as part of an expression.
For the
example,
set x 1
set y 2
set z "$x + $y is [expr $x +
$y]."
t
he
value of local variable z is set to a text string that reads: 1 + 2
is 3.