Variable names are case insensitive and are limited to 32 characters.
The variable name must be unique.
A variable can be referenced as $X or $(X).
If a variable already exists, it is overwritten. No error message is displayed.
The variable expression can be a constant value, another variable, or a combination of the above with operators and functions. Operators are described in Using Operators, and functions are described in Using Built-In Functions.
Only the set var command supports expression evaluation.
If the variable name X contains special characters such as +-/*, then the variable needs to be enclosed in parentheses. For example: set var z ($(x) + 100).
When you use a variable with a TCL special character in the $TCL function, the variable must be enclosed in braces. For example: set var x $TCL(string length ${CLI.USER}.
Note
EXOS does not consider the dot/period character as a de-limiter. This is different from standard TCL behavior, where dot/period is considered as a de-limiter.
The following examples show various ways to define or change variables:
set var x 100
set var x ($x + 2)
set var y ($x - 100)