JBASE_ERRMSG_DIVIDE_ZERO

Man Page Index


Description
Defines behavior in a BASIC program when the divisor of an arithmetic division results to a value of '0' (zero). The default behavior is to raise an error and drop into the debugger.

Values
1 - Don't display an error message
2 - Don't enter the debugger
16 - Caller to place "0" in the target variable after operation
32 - Caller to place "" (null) in the target variable after operation
64 - Caller to leave target variable alone after operation
128 - Caller to place source variable in the target variable after operation

Default
0 - Raise an error and drop into the debugger

Setting
The value stored in a bit mask so different behaviours can be combined by adding them together. For example, to suppress the error message and avoid going into the debugger, set the variable to 3. As per normal environment variables, it canbe set at any time or in a BASIC program with the jBC PUTENV function.

Unix
export JBASE_ERRMSG_DIVIDE_ZERO=3

Windows
set JBASE_ERRMSG_DIVIDE_ZERO=3

Notes
The functionality provided by
JBASE_WARNLEVEL on 3.x has been implemented in a different fashion on subsequent releases. This was a design decision to make the behavior of the runtime more flexible and consistent at the same time. Instead of a global setting handling all conditions, there are now settings for individual error messages according to the bit mask.

See also JBASE_ERRMSG_TRACE, JBASE_ERRMSG_ZER0_USED, JBASE_ERRMSG_NON_NUMERIC.


ENV