[ Event Handling | Reference Manual | Alphabetic Index ]

event_disable(+EventHandle)

Disable the given event
EventHandle
An event handle

Description

The given event is disabled. A disabled events behaves as if its handler was the goal 'true':

Note that disabling and enabling events are nonlogical operations which are not undone on backtracking.

Modes and Determinism

Exceptions

(4) instantiation fault
EventHandle is un-instantiated
(5) type error
EventHandle is not a handle

Examples

    ?- event_create(writeln(hello), [], E),
       event_disable(E), writeln(disabled),
       event(E),	% does nothing
       event_enable(E), writeln(enabled),
       event(E).
    disabled
    enabled
    hello
    

See Also

event_create / 3, event / 1, event_enable / 1, event_retrieve / 3