Variables can be used to store the result of an expression under a symbolic name. The value of a variable can be modified at any point in a script by assigning a new expression to the variable.
A variable name consists of any sequence of alphanumeric characters and the underscore (A-Z, a-z, 0-9 and _). A variable name cannot begin with a digit or an underscore.
The following keywords cannot be used as variable name: NOT, not, FI, fi, ELSE, else, ELIF, elif, OD, od, TRUE, true, FALSE, false.
The symbolic names of variables, parameters and constants must all be unique within their script.
Note
The symbolic names of variables are case sensitive.
Note
A variable declared in a conditional or iterating statement can only be used from its definition until the end of that statement (statement scope).
Declaring variables
Variables can be declared everywhere in the script but they must be declared before they can be used. If there is an initial value assigned to the variable it is evaluated at the moment the variable is declared. If there is no value assigned the variable will be initialized using an empty value.
Var type name = expression;
Var type name;
For the first Var Type you have to assign an initial value, while the second has no intial value. A variable is empty until a value is assigned to it.
The declaration assigns a type to the variable and only values with that type can be assigned to the variable. There are three types of variables:
Note
Values type Number in ITP/Server must lie between -2.147.483.648 and +2.147.483.647.