Operators
Operators in expressions
The following tables show operand types and results of arithmetical and logical operations.
When evaluating any expressions, there holds that if any operand in a calculation is invalid, the result is also invalid. However, an eval tag is exception, if the parameter "Replace Invalid values with 0" is set. Then it is evaluated as it is mentioned here.
See also the topic Order of operators by the priority
Arithmetical operators
Operator | Operation | Description | Operand types | Result type | |||
|---|---|---|---|---|---|---|---|
+ | addition | Difference between two absolute times is calculated this
way: or ATime - RTime = %AddTimeLocal(ATime, -RTime) | integer | integer | |||
| absolute time | ||||||
- | subtraction | Difference between two absolute times is calculated this way: or ATime - RTime = %AddTimeLocal(ATime, -RTime)
| integer | integer | |||
| absolute time | ||||||
* | multiplication |
| integer | integer | |||
/ | division |
| integer | real | |||
- | unary operator |
| integer | integer |
In mathematical operations, operands of Boolean type are converted to Integer type as follows:
TRUE -> 1
FALSE-> 0
Note
Result of an function of Boolean type may be converted to other type by the multiplying with the constant of the particular type. For example: %Flag(Object,@A)*1 gives a numerical type of the result value, i.e. Integer, Real.