12.3.61 SP_open_query()

Synopsis

     #include <sicstus/sicstus.h>
     
     SP_qid
     SP_open_query(SP_pred_ref predicate,
                   SP_term_ref arg1,
                   ...);

Sets up a query for use by SP_next_solution(), SP_close_query(), SP_cut_query().

Arguments

predicate
The predicate to call.
arg1...
The arguments to pass.

Return Value

The query identifier if successful, otherwise 0,

Description

Note that if a new query is opened while another is already open, the new query must be terminated before exploring the solutions of the old one. That is, queries must be strictly nested.

See Also

Finding Multiple Solutions of a Call.


Send feedback on this subject.