HPlogo 900 Series HP 3000 Computer Systems: MPE/iX Intrinsics Reference Manual > Chapter 4 Command Definitions

ARITRAP

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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:

ValueMeaning
0Disable all arithmetic traps
1Enable 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

  • Decimal divide by zero

  • Decimal overflow

  • IEEE floating-point divide by zero

  • IEEE floating-point underflow

  • IEEE floating-point overflow

  • IEEE floating-point, invalid operation

  • Integer divide by zero

  • Integer overflow

  • Invalid ASCII digit

  • Invalid decimal digit

  • Paragraph stack overflow

  • Range errors

  • 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

  • Decimal divide by zero

  • Decimal overflow

  • Integer divide by zero

  • Integer overflow

  • Invalid ASCII digit

  • Invalid decimal digit

  • 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)

Feedback to webmaster