[ Event Handling | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]
event_retrieve(+EventHandle, ?Goal)
Given the handle with which an event is associated, retrieve the event goal.
- EventHandle
- An event handle
- Goal
- A free variable or goal to unify
Description
The goal associated with an event handle, created using event_create / 2, is
retrieved using this predicate.
Like event creation, retrieval of the goal produces a copy of the
goal. As a result, if the goal contains variables, they lose their identity
and are replaced with fresh ones.
Fail Conditions
Goal does not unify with the event goal of EventHandle
Resatisfiable
No
Exceptions
- (4) instantiation fault
- EventHandle is un-instantiated
- (5) type error
- EventHandle is not a handle
Examples
[eclipse 4]: event_create(writeln('Hello world!'), Event), event_retrieve(Event, EventGoal).
Event = 'EVENT'(16'50421bd0)
EventGoal = writeln('Hello world!')
Yes (0.00s cpu)
See Also
event_create / 2, event / 1, event_after / 2, event_after / 3, event_after_every / 2, set_event_handler / 2, current_after_events / 1, cancel_after_event / 2, is_event / 1