12.2.5 Foreign Interface

SP_atom_from_string()

returns the encoded string representing a Prolog atom

SP_atom_length()

returns the length of the encoded string representing a Prolog atom

SP_close_query()

closes a Prolog query opened from C by SP_open_query()

SP_cons_functor()
SP_cons_functor_array()

creates a Prolog compound term from C

SP_cons_list()

creates a Prolog list from C

SP_cut_query()

terminates a nondeterminate Prolog query opened from C

SP_define_c_predicate()

defines a Prolog predicate linked to a C function

SP_exception_term()

returns the Prolog term to C corresponding to the most recent Prolog error

SP_get_address()

fetches an integer representing a pointer in an SP_term_ref

SP_get_arg()

fetches a specified argument of a compound term in an SP_term_ref

SP_get_atom()

fetches an atom from an SP_term_ref

SP_get_current_dir()

obtain name of current working directory

SP_get_float()

fetches a floating point number from an SP_term_ref

SP_get_functor()

fetches the name and arity of a term in an SP_term_ref

SP_get_integer()

fetches an integer in an SP_term_ref

SP_get_integer_bytes()

fetches an arbitrarily sized integer in an SP_term_ref

SP_get_list()

fetches the head and tail of a list in an SP_term_ref

SP_get_list_codes()

fetches a code-list in an SP_term_ref

SP_get_list_n_codes()

fetches the first part of a code-list in an SP_term_ref

SP_get_list_n_bytes()

fetches the first part of a byte-list in an SP_term_ref

SP_get_number_codes()

fetches a number encoded as a code-list in an SP_term_ref

SP_get_string()

fetches the encoded string representing a Prolog atom in an SP_term_ref

SP_next_solution()

gets the next solution, if any, to an open Prolog query

SP_open_query()

opens a Prolog query from C

SP_pred()

fetches an identifier for a Prolog predicate

SP_predicate()

fetches an identifier a Prolog predicate

SP_put_address()

assigns a pointer to an SP_term_ref

SP_put_atom()

assigns an atom to an SP_term_ref

SP_put_float()

assigns a floating point number to an SP_term_ref

SP_put_functor()

assigns a new compound term to an SP_term_ref

SP_put_integer()

assigns an integer to an SP_term_ref

SP_put_integer_bytes()

assigns an arbitrarily sized integer to an SP_term_ref

SP_put_list()

assigns a new list to an SP_term_ref

SP_put_list_codes()

assigns a code-list to an SP_term_ref

SP_put_list_n_codes()

assigns the first part of a code-list to an SP_term_ref

SP_put_list_n_bytes()

assigns the first part of a byte-list to an SP_term_ref

SP_put_number_codes()

assigns a number encoded as a code-list to an SP_term_ref

SP_put_string()

assigns the atom represented by an encoded string to an SP_term_ref

SP_put_term()

assigns the value of an SP_term_ref to another SP_term_ref

SP_put_variable()

assigns a Prolog variable to an SP_term_ref

SP_query()

makes a determinate query to a Prolog predicate, committing to the solution

SP_query_cut_fail()

makes a determinate query to a Prolog predicate for side-effects only

SP_read_from_string()

assigns a Prolog term read from a string to an SP_term_ref

SP_set_current_dir()

set name of current working directory

SP_string_from_atom()

returns a null-terminated string corresponding to a Prolog atom



Send feedback on this subject.