 |
» |
|
|
|
NM and CM callable (differences noted below). Collectively enables all arithmetic traps (except the IEEE inexact
result trap) or disables all arithmetic traps. Syntax |  |
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. |  |  |  |  |
(NM) The possible interrupts listed below are collectively called the
arithmetic traps: 3000 mode double-precision divide by zero 3000 mode double-precision overflow 3000 mode double-precision underflow 3000 mode floating-point divide by zero 3000 mode floating-point overflow 3000 mode floating-point underflow 3000 mode packed decimal error IEEE floating-point divide by zero IEEE floating-point underflow IEEE floating-point overflow IEEE floating-point, invalid operation Result of software-detected pointer arithmetic misaligned or
error in conversion from long pointer to short pointer Software-detected NIL pointer reference Unimplemented condition traps
 |  |  |  |  | NOTE: The IEEE inexact result trap is not enabled by ARITRAP. |  |  |  |  |
(CM) The possible interrupts listed below are collectively called the
arithmetic traps: 3000 mode double-precision divide by zero 3000 mode double-precision overflow 3000 mode double-precision underflow 3000 mode floating-point divide by zero 3000 mode floating-point overflow 3000 mode floating-point underflow Invalid decimal operand length Invalid source word count
Condition Codes |  |
- CCE (2)
Request granted. All arithmetic traps were originally disabled. - CCG (0)
Request granted. At least one arithmetic trap was originally
enabled. - CCL (1)
Not returned.
Related Information |  |
- Intrinsics
XARITRAP - Commands
None - Manuals
Trap Handling Programmer's Guide (32650-90026)
|