ZERODIVIDE condition

A computational condition indicating that an attempt has been made to divide by zero.

Enabled/Disabled status

Always enabled.

Result

Undefined due to the undefinable result of a division by zero.

Raised

When an attempt is made to divide by zero.

Restriction

  • Compiling with the -dfp option to divide fixed decimals with large precision might cause some ZERODIVIDE exceptions to be reported as INVALIDOP.

Notes

This condition is raised for fixed-point and floating-point division.

If the numerator of a floating-point divide is also zero, INVALIDOP is raised.

If the ZERODIVIDE condition is raised, but it is also disabled, the program is in error.

Other Information

Abbreviation
ZDIV
Condition code
320
Implicit action
Prints a message and raises an ERROR condition.
Normal return
Raises an ERROR condition and ends program execution by executing a STOP statement.