next up previous contents index
Next: Non-deterministic Foreign Predicates Up: The Foreign Include File Previous: The Foreign Include File   Contents   Index

Argument Passing and Control

If Prolog encounters a foreign predicate at run time it will call a function specified in the predicate definition of the foreign predicate. The arguments $1, \ldots, \bnfmeta{arity}$ pass the Prolog arguments to the goal as Prolog terms. Foreign functions should be declared of type foreign_t. Deterministic foreign functions have two alternatives to return control back to Prolog:

voidPL_succeed Succeed deterministically. PL_succeed is defined as return TRUE. voidPL_fail Fail and start Prolog backtracking. PL_fail is defined as return FALSE.



Subsections

Dr. Richard Botting 2001-12-12