Next: Obsolete Suspension Facilities
Up: Advanced Control Features
Previous: The Cut and the
  Index
Delaying of Built-In Predicates
A number of built-in predicates can be configured to delay when their
arguments are not sufficiently instantiated. This behaviour uses the
more general mechanism introduced above and is enabled with
:- set_flag(coroutine, on).
As a consequence, these predicates will no longer raise
instantiation faults, but delay instead.
For example:
[eclipse 1]: X > 0.
instantiation fault in X > 0
[eclipse 2]: set_flag(coroutine, on).
yes.
[eclipse 3]: X > 0.
X = X
Delayed goals:
X > 0
yes.
The delayed predicate will be executed as soon as the responsible variable
is instantiated:
[eclipse 4]: X > 0, X=1.
X = 1
yes.
The following built-ins have this property:
Next: Obsolete Suspension Facilities
Up: Advanced Control Features
Previous: The Cut and the
  Index
1999-08-06