Specifications
13 – Configuring Reports
290 R400
P (Perform Calculation)
Purpose
Specifies a calculation to be performed. The result of the calculation is stored in a
free format variable. This entry is always used together with the C (Calculated
Variable Definition) entry and may come before or after it.
Format
P
Index Expression
Description
Index
The number (1-999) identifying report variable to store result of calculation.
Expression
Free-Format expression
The expression can be composed of index numbers, (denoted by a “$”
meta-character), constants, and any combination of the operators:
+add
- subtract
/divide
*multiply
^ exponentiate
=equate
() brackets
Example
P 22 = $27+$99*0.75/($32+5)
Where:
$27, $99 and $32 are index numbers 27, 99 and 32 respectively.
Note • The expression is terminated with a blank (space) or a “:” character. A
maximum of 10 operations may be performed on one line.
• Calculations are done to the highest precision and rounded to the desired
print format. This can result in the following situation:
123.0
123.0
TOTAL 246.1
plscpcg.book Page 290 Monday, May 28, 2001 10:11 AM