[ Advanced Control and Suspensions | Reference Manual | Alphabetic Index ]
Succeeds iff Goal succeeds and unifies Delayed_goals with a list of
remaining delayed goals.
- Atom or compound term.
- Variable or list.
Calls the goal Goal. When Goal succeeds, Delayed_goals is unified with
a list of goals that were delayed, but not resumed during execution of
Goal. These goals, together with the variable bindings in Goal, can be
regarded as a qualified answer to Goal. I.e. Goal is true under the
condition that the conjunction of delayed goals is also true.
Note that, after exiting from subcall/2, the goals collected in
Delayed_goals do no longer exist as delayed goals.
This predicate is sensitive to its module context (tool predicate, see @/2).
Fails if Goal fails
Resatisfiable if Goal is resatisfiable
- (4) instantiation fault
- Goal is not instantiated.
- (5) type error
- Goal is neither an atom nor a compound term.
- (68) calling an undefined procedure
- Goal is an undefined procedure.
[eclipse]: X > 0, subcall(X < 5, DG).
X = X
DG = [X < 5]
X > 0
[eclipse]: subcall( (X > 0, Y > 0, X = 3) , DG).
Y = Y
X = 3
DG = [Y > 0]
subcall(Var, D). (Error 4).
subcall(3, D). (Error 5).
subcall(foo(a), D). (Error 68).
call / 1, @ / 2, : / 2, call_priority / 2