[Up] [Contents] [Index] [Summary]

5.6.1 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, ... , <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:

void PL_succeed()
Succeed deterministically. PL_succeed is defined as return TRUE.

void PL_fail()
Fail and start Prolog backtracking. PL_fail is defined as return FALSE.


Section Index