Specifications
CHAPTER 23 Operators and Expressions
Users Guide 619
Arithmetic operators in InfoMaker expressions
When you write an expression, you can use the following arithmetic operators:
Table 23-5: Using expressions with arithmetic operators
Multiplication and
division
Multiplication and division are carried out to full precision (16–18 digits).
Values are rounded:
Table 23-6: Value rounding in InfoMaker expressions
Calculations with null
When you form an arithmetic expression that contains a null value, the
expression becomes
null. Thinking of null as undefined makes this easier to
understand. For example, when a
null column is multiplied by 5, the entire
expression also evaluates to
null. Use the IsNull function to explicitly check for
the null value.
Boolean expressions that contain a null value evaluate to
false rather than to
null. For more information, see “Relational operators in InfoMaker
expressions” next.
Relational operators in InfoMaker expressions
You use relational operators to compare a value with other values. The result is
a boolean expression whose value is always
true or false.
Since the result of a boolean expression is always
true or false, a relational
operator that compares a value to
null evaluates to false. For example, the
expression “column > 5” evaluates to
false (and “NOT column > 5” evaluates
to
true) when the column value is null.
Operator Meaning Example
+ Addition SubTotal + Tax
- Subtraction Price - Discount
* Multiplication Quantity * Price
/ Division Discount / Price
^ Exponentiation Rating ^ 2.5
Expression Value
20.0/3 6.666666666666667
3*(20.0/3) 20
Truncate(20.0/3,4) 6.6666