Dyadic operators
Formulas in the Template scripting language are calculated from left to right in case of operators with equal priority.
The Template scripting language knows the following dyadic operators.
Operator |
Associativity |
Operand Types |
Result Type |
Operation Performed |
---|---|---|---|---|
+ |
Left |
NUMBER |
NUMBER |
Addition |
+ |
Left |
TEXT |
TEXT |
Concatenation of operand texts |
- |
Left |
NUMBER |
NUMBER |
Subtraction |
* |
Left |
NUMBER |
NUMBER |
Multiplication |
/ |
Left |
NUMBER |
NUMBER |
Division |
% |
Left |
NUMBER |
NUMBER |
Percentage |
< |
Left |
NUMBER; TEXT |
NUMBER |
Less than |
> |
Left |
NUMBER; TEXT (*) |
BOOL |
Greater than |
<= |
Left |
NUMBER; TEXT (*) |
BOOL |
Less than or equal |
>= |
Left |
NUMBER; TEXT (*) |
BOOL |
Greater than or equal |
= |
Left |
Left and right the same type; NUMBER or BOOL |
BOOL |
Equal to |
<> |
Left |
Left and right the same type; NUMBER or BOOL |
BOOL |
Not equal to |
AND |
Left |
BOOL |
BOOL |
Left AND right operand must be TRUE for the result to be TRUE. |
OR |
Left |
BOOL |
BOOL |
Left OR right or both operands must be TRUE for the result to be TRUE |
Comparing two text values with dyadic operators could fail if you try to compare two text values that use a different encoding system. You should use the function compare_characters to avoid errors (for more information, see compare_characters).