[ Type Testing | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

# is_event(?Term)

Succeeds if Term is an event name or handle

Term
  Prolog term.

## Description

Used to test whether Term is either an event name (an atom) or an event handle (a special kind of handle as created by event_create/3).

### Modes and Determinism

- is_event(?) is semidet

### Fail Conditions

Fails if Term is neither an atom nor an event handle

## Examples

        ?- is_event(my_event).
        Yes (0.00s cpu)

        ?- event_create(true, [], E), is_event(E).
        E = 'EVENT'(16'edc90b18)
        Yes (0.00s cpu)

        ?- bag_create(B), is_event(B).
        No (0.00s cpu)

        ?- is_event(_).
        No (0.00s cpu)

        ?- is_event(42).
        No (0.00s cpu)

## See Also

event / 1, atom / 1, is_handle / 1, event_create / 3, type_of / 2