Next: , Previous: , Up: cpg-bif   [Contents][Index]


12.3.6 SP_cons_functor()

Synopsis

#include <sicstus/sicstus.h>

int
SP_cons_functor(SP_term_ref term,
                SP_atom name,
                int arity,
                SP_term_ref arg, …);

Assigns to term a reference to a compound term whose arguments are the values of arg…. If arity is 0, assigns the Prolog atom whose canonical representation is name. This is similar to calling =../2 with the first argument unbound and the second argument bound.

Arguments

term

The SP_term_ref to be assigned

name

The name of the functor

arity

The arity of the functor

arg …

The arguments

Return Value

Zero if the conversion fails (as far as failure can be detected), and a nonzero value otherwise.

See Also

Creating Prolog Terms.


Send feedback on this subject.