#include <quintus/quintus.h> int QP_query(pred_ref, arg1,...,arg255) QP_pred_ref pred_ref;
Make a determinate query in a single C function call.
The first argument passed to
QP_query() is a reference
to the Prolog predicate to be called.
QP_query() accepts between 0 and 255
arguments after its first argument. Any arguments after the first
represent parameters to be passed to and from the Prolog predicate.
For the types of arguments that may be passed between C and Prolog predicates,
The foreign language interface will interpret arguments passed to the Prolog
predicate according to the call specification given when the predicate
was made callable. Hence, it is important that the arguments to be passed
to and from the Prolog predicate should correspond with that call
specification. In certain cases (passing Prolog atoms in canonical
form) it is possible to detect inconsistencies between data supplied to
QP_query() and the call specification, but for the most part this is
impossible. Calls that are inconsistent with their call specifications
will produce undefined results.
Only when the return value is
QP_SUCCESS are the values in variables
passed as outputs from Prolog valid. Otherwise, their contents are