5 Operators and Functions

The Default ON/OFF Statements

Many arithmetic errors occur due to either an improper argument value or by exceeding the computing range. This suspends program execution. It is possible to override some of these errors by providing a default value for the number which is out of range. The default values are enabled by executing the DEFAULT ON statement:

DEFAULT ON

Errors that can be overriden and their corresponding default values are shown in the following table:

Default values
Error (Number) Default Value
Integer precision overflow (20)2147483647 (231-1) or -2147483648 (-231) (DINTEGER)-32768.+32767 (INTEGER)
Full precision overflow (22)+ or -9.99999999999E125
Zero to negative power (26)9.99999999999E+125
LGT or LOG of zero (29)-9.99999999999E+125
Division by zero (31)+ or -9.99999999999E+125
X MOD Y, where Y=0 (31)0

Default values are disabled by executing the DEFAULT OFF statement:

DEFAULT OFF

DEFAULT OFF is set at power on or when any SCRATCH statement is executed.


Eloquence Language Manual - 19 DEC 2002