DROUND


The DROUND( ) function performs double-precision rounding on a value.

 

COMMAND SYNTAX

DROUND(expression1{, expression2})

 

SYNTAX ELEMENTS

expression1 is the value to round.
expression2 is the optional precision.

 

NOTES

Double-precision rounding uses 2 words to store a number.

If a precision is not specified as the second expression, DROUND() uses whatever precision is set at the time of the calculation. If no PRECISION statement was issued then the default precision of 4 is used.

You must specify the precision (either with the PRECISION statement or with the optional precision parameter) to be greater than or equal to the rounding digit, otherwise the calculation will truncate the value to the whatever precision is 'active' at the time of the calculation.

 

EXAMPLES

CRT DROUND(1.23456)
will display the value 1.2346 (using the default precision of 4)

CRT DROUND(1.2345678, 5)
will display the value 1.23457


jBC