MPE/iX Intrinsics Reference Manual (32650-90905)
54 Chapter4
Command Definitions (ABORTSESS - FCLOSE)
ARITRAP
ARITRAP
NM and CM callable (differences noted below).
Collectively enables all arithmetic traps (except the IEEE inexact result trap) or disables
all arithmetic traps.
Syntax
I*V
ARITRAP(
trapstate
);
Parameters
trapstate
(NM) 32-bit signed integer by value (required)
(CM) 16-bit signed integer by value (required)
(NM) Enables/disables arithmetic traps:
Value Meaning
0
Disable all arithmetic traps
1 Enable all arithmetic traps (except the IEEE inexact
result trap)
(CM) Enables/disables CM arithmetic traps.
Operation Notes
There is a difference between arming and enabling traps. Enabling a trap means that the
occurrence of a trap condition is not ignored. Arming a trap is required so that, on a trap
condition, a user-written routine is invoked and can take appropriate recovery actions. The
following list summarizes what can happen when an arithmetic trap condition occurs:
• If a trap is both enabled and armed, the user-written trap handler is invoked.
• If a trap is enabled but not armed, one of two situations apply:
• If a Pascal/XL TRY statement was executed, pass control to the RECOVER block by
doing an ESCAPE.
• If a Pascal/XL TRY statement was not executed, an error message is output and the
process aborts.
• If a trap is disabled, even though it is armed, the trap is ignored, and execution of the
process continues without any interruption.
NOTE By default, all traps (except the IEEE inexact result trap) are enabled and
the system trap handler is armed.