[ Obsolete | Reference Manual | Alphabetic Index ]

event_retrieve(+EventHandle, -Goal)

Given the handle with which an event is associated, retrieve the event goal.
An event handle
A free variable or goal to unify

This built-in predicate is obsolete!


The goal associated with an event handle, created using event_create / 3, 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.

If the event was disabled, the goal 'true' is retrieved instead of the original goal.

Modes and Determinism


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


    ?- 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_retrieve / 3