Descriptive Type |
Mode Usage |
Associated C Type |
Comments |
int |
+ |
int |
integer numbers |
float |
+ |
double |
floating point numbers |
atom |
+ |
unsigned long |
atom represented as an unsigned long |
chars |
+ |
char * |
the textual representation of an atom is passed
to C as a string |
chars(size) |
+ |
char * |
the textual representation of an
atom is passed to C |
|
|
|
as a string in a buffer of size size |
string |
+ |
char * |
a prolog list of characters is passed to C as a
string |
string(size) |
+ |
char * |
a prolog list of characters is
passed to C as a string |
term |
+ |
prolog_term |
the unique representation of a term |
intptr |
+ |
int * |
the location of a given integer |
floatptr |
+ |
double * |
the location of a given floating point
number |
atomptr |
+ |
unsigned long * |
the location of the unique
representation of a given atom |
charsptr |
+ |
char ** |
the location of the textual representation of
an atom |
stringptr |
+ |
char ** |
the location of the textual representation
of a list of characters |
termptr |
+ |
prolog_term * |
the location of the unique
representation of a term |
intptr |
- |
int * |
the integer value returned is passed to Prolog |
floatptr |
- |
double * |
the floating point number is passed back to
Prolog |
charsptr |
- |
char ** |
the string returned is passed to Prolog as an
atom |
stringptr |
- |
char ** |
the string returned is passed back as a list
of characters |
atomptr |
- |
unsigned long * |
the number returned is passed back to
Prolog as the |
|
|
|
unique representation of an atom |
termptr |
- |
prolog_term * |
the number returned is passed to Prolog
as the unique |
|
|
|
representation of a term |
chars(size) |
+- |
char * |
the atom is copied from Prolog to a
buffer, passed to C |
|
|
|
and converted back to Prolog afterwards |
string(size) |
+- |
char * |
the list of characters is copied
from Prolog to a buffer, |
|
|
|
passed to C and back to Prolog afterwards |
intptr |
+- |
int * |
an integer is passed from Prolog to C and from C
back to Prolog |
floatptr |
+- |
double * |
a float number is passed from Prolog to C,
and back to Prolog |
atomptr |
+- |
unsigned long * |
the unique representation of an atom
is passed to C, and back to Prolog |
charsptr |
+- |
char ** |
the atom is passed to C as a string, and
a string is passed to |
|
|
|
Prolog as an atom |
stringptr |
+- |
char ** |
the list of characters is passed to C, and
a string passed to Prolog |
|
|
|
as a list of characters |
termptr |
+- |
prolog_term * |
the unique representation of a term is
passed to C, |
|
|
|
and back to Prolog |