The compiler handles arithmetic statements as a succession of operations,
performed according to operator precedence, and sets up an intermediate field
to contain the results of these operations.
Intermediate results are possible in the following cases:
- In an ADD or SUBTRACT statement containing more than one operand immediately
following the verb.
- In a COMPUTE statement specifying a series of arithmetic operations or
multiple result fields.
- In arithmetic expressions contained in conditional statements and reference
modification specifications.
- In the GIVING option with multiple result fields for the ADD, SUBTRACT,
MULTIPLY, or DIVIDE statements.
- In a statement with an intrinsic function used as an operand.
For a discussion on when the compiler uses fixed-point or floating-point
arithmetic, refer to the "Working with Data Items" chapter in the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide.