Availability:C-language interface function
PL_get_*()
also
validate the type and thus the two sections below are equivalent.
if ( PL_is_atom(t) ) { char *s; PL_get_atom_chars(t, &s); ...; } or char *s; if ( PL_get_atom_chars(t, &s) ) { ...; }
VersionĀ 7 added PL_NIL
, PL_BLOB
,
PL_LIST_PAIR
and PL_DICT
. Older versions
classify PL_NIL
and PL_BLOB
as PL_ATOM
,
PL_LIST_PAIR
as PL_TERM
and do not have dicts.
PL_VARIABLE | A variable or attributed variable |
PL_ATOM | A Prolog atom |
PL_NIL | The constant [] |
PL_BLOB | A blob (see section 12.4.8.2) |
PL_STRING | A string (see section 5.2) |
PL_INTEGER | A integer |
PL_RATIONAL | A rational number |
PL_FLOAT | A floating point number |
PL_TERM | A compound term |
PL_LIST_PAIR | A list cell ([H|T] ) |
PL_DICT | A dict (see section 5.4)) |