COBOL/400 Language Help


ROUNDED Phrase

The ROUNDED phrase prevents truncation when the size of the fractional result of an arithmetic operation exceeds the number of places provided for its storage.

The ROUNDED phrase causes the least significant digit of the resultant identifier to be increased by 1 whenever the most significant digit of the excess is greater than or equal to 5.

When the resultant identifier is described by a PICTURE clause containing rightmost P's, and when the number of places in the calculated result exceeds the number of integer positions specified, rounding or truncation occurs, relative to the rightmost integer position for which storage is allocated.


[ Top of Page | Previous Page | Next Page | Table of Contents ]