Up Next
9.1 Coroutining

9.1.1 freeze/2

Templates
freeze(?term, ?term)
Description

freeze(Var, Goal) blocks Goal until Var is unified to a non variable term.

Errors

None.

Portability

GNU Prolog RH predicate.

9.1.2 frozen/2

Templates
frozen(-term, ?term)
Description

frozen(Var, Goals) unifies Goals with the conjunction of all goals which are blocked on the variable Var. If no goal is blocked, Goals is unified with atom true.

Errors

None.

Portability

GNU Prolog RH predicate.

9.1.3 portray/2        [user-defined]

Templates
portray(+callable_term, -callable_term)
Description

If after the success of a query, a goal Goal is still blocked on a variable Var, portray(Goal, Goal2) is called by the Prolog top level. If this one succeeds, Goals2 is displayed, but if portray/2 fails or if it is not defined freeze(Var, Goal) is printed instead.

Note : Only the goals blocked on the variables of the query are displayed.




Copyright (C) 1999-2002 Daniel Diaz.

Chapters 9 and 10 : Copyright (C) 2002-2003 INRIA, Rémy Haemmerlé.

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

More about the copyright
Up Next