Node:Testing Prolog Terms, Next:Unifying and Comparing Terms, Previous:Accessing Prolog Terms, Up:Support
There is one general function for type testing of Prolog terms and a set of specialized, more efficient, functions, one for each term type:
int SP_term_type(SP_term_ref t)
SP_TYPE_VARIABLE
, SP_TYPE_INTEGER
, SP_TYPE_FLOAT
,
SP_TYPE_ATOM
, or SP_TYPE_COMPOUND
is returned.
int SP_is_variable(SP_term_ref t)
int SP_is_integer(SP_term_ref t)
int SP_is_float(SP_term_ref t)
int SP_is_atom(SP_term_ref t)
int SP_is_compound(SP_term_ref t)
int SP_is_list(SP_term_ref t)
int SP_is_atomic(SP_term_ref t)
int SP_is_number(SP_term_ref t)