option #11

Rounding vs. truncation

WSupported on Windows
USupported on Unix
VSupported on OpenVMS

 

System option #11 determines whether Synergy DBL rounds or truncates expression results by default.

If option #11 is set, Synergy DBL truncates results in the following situations at compile time:

dim_var[dexp, dexp, ...]  ^arg(dexp)
var(dexp)           ^argn(dexp)
var(dexp, dexp)      ^d(exp, dexp)
var(dexp:dexp)
goto (lbl, lbl, ...) dexp
read(channel, data_area, dexp)

If option #11 is not set, Synergy DBL defaults to rounding in each of the above situations. When rounding, if the leftmost digit (or the eleventh digit for multiplication or division) of the fractional precision is in the range 5 through 9, Synergy DBL adds one to the absolute value of the whole number part (or the fractional part for multiplication or division). For example, if system option #11 is not set and you specify 3.5 as the record number to read in a READ statement, you get the fourth record. If system option #11 is set, you get the third record.

The state of this option is overridden in routines using the ROUND or TRUNCATE option on MAIN, SUBROUTINE, and FUNCTION.

This option is only used at compile time. It is ignored at runtime.