next up previous contents index
Next: Atoms and atom-garbage collection Up: The Foreign Include File Previous: Non-deterministic Foreign Predicates   Contents   Index

Atoms and functors

The following functions provide for communication using atoms and functors.

atom_tPL_new_atomconst char * Return an atom handle for the given C-string. This function always succeeds. The returned handle is valid as long as the atom is referenced (see atomgc).

const char*PL_atom_charsatom_t atom Return a C-string for the text represented by the given atom. The returned text will not be changed by Prolog. It is not allowed to modify the contents, not even `temporary' as the string may reside in read-only memory.

functor_tPL_new_functoratom_t name, int arity Returns a functor identifier, a handle for the name/arity pair. The returned handle is valid for the entire Prolog session. atom_tPL_functor_namefunctor_t f Return an atom representing the name of the given functor. intPL_functor_arityfunctor_t f Return the arity of the given functor.



Subsections

Dr. Richard Botting 2001-12-12