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

5.6.14 Registering Foreign Predicates

int PL_register_foreign(name, arity, function, flags)
Register a C-function to implement a Prolog predicate. After this call returns successfully a predicate with name name (a char *) and arity arity (a C int) is created. When called in Prolog, Prolog will call function. flags forms bitwise or'ed list of options for the installation. These are:

PL_FA_NOTRACEPredicate cannot be seen in the tracer
PL_FA_TRANSPARENTPredicate is module transparent
PL_FA_NONDETERMINISTICPredicate is non-deterministic. See also PL_retry().