Passing a Prolog term to a Foreign Function
     Prolog:  +term
     C:       QP_term_ref

The argument can be any Prolog term. The C function gets an object of type QP_term_ref (defined in <quintus/quintus.h>). QP_term_type() and associated functions can be used to test the type of the term. And the QP_get() functions can be used to access the value associated with the term. QP_unify() can be used to used to unify terms or subterms of terms passed to C.