Report calculation expression examples
This example illustrates the use of operators in QMF report calculations.
In the examples shown in the following table, assume that:
- &SUM1 has the value 1600
- &SUM2 has the value 400
- &DATE has the value "87/12/15"
Expression | Result |
---|---|
&SUM2/25 | 16 |
&SUM2-&SUM1*.25 | 0 |
&SUM1+&SUM2 < 4000 | 1 (true) |
' ' = '' | 1 (true) |
' ' == '' | 0 (false) |
&SUM1+(&DATE<'88')&SUM2 | 2000 |
date(u) (built-in function) | "12/15/87" |
The following expression produces the same result as the
date(u) function:
substr(&DATE,4,5) || "/" ||
substr(&DATE,7,8) || "/" ||
substr(&DATE,1,2)