[ Event Handling | Reference Manual | Alphabetic Index ]

current_interrupt(?N, ?IntID)

Succeeds if N unifies with the number and IntID unifies with the mnemonic name of a valid interrupt.
N
Positive integer or variable.
IntID
Atom or variable.

Description

This predicate unifies N with the signal number and IntID with the mnemonic name of an existing interrupt type. This predicate can be used to find the signal number related to a mnemonic interrupt name and vice versa, or to return all valid interrupts on backtracking.

Modes and Determinism

Fail Conditions

N or IntID do not unify with the interrupt number resp. the mnemonic name of a valid interrupt

Exceptions

(5) type error
N is instantiated, but not to an integer.
(5) type error
IntID is instantiated, but not to an atom.

Examples

Success:
      current_interrupt(2, X)         (gives X = int)
      current_interrupt(X, kill)      (gives X = 9)
      current_interrupt(N, Int)
Fail:
      current_interrupt(43, Int)
      current_interrupt(N, noint)
Error:
      current_interrupt(1.0, Int).    (Error 5).
      current_interrupt(N, "int").    (Error 5).



See Also

current_error / 1, kill / 2