The following table lists the possible values for the arguments in
the predicate specification of foreign/[2,3]. The value
declares which conversion between corresponding Prolog argument
and C type will take place. 
Please note: here, the term `chars' refers to a code-list, rather than to a char-list.
Prolog: +integerC:      longlong and passed to the C function. 
Prolog: +floatC:      doubledouble and
passed to the C function. 
Prolog: +atomC:      SP_atomProlog: +charsC:      char *Prolog: +stringC:      char *Prolog: +string(N)  obsolescentC:      char *Prolog: +addressC:      void *void * pointer.
     Prolog: +address(TypeName)C:      TypeName * * pointer. 
Prolog: +termC:      SP_term_refProlog: -integerC:      long *long. 
The value returned will be converted to a Prolog integer. 
Prolog: -floatC:      double *double. 
The value returned will be converted to a Prolog float. 
Prolog: -atomC:      SP_atom *SP_atom. 
The value returned should be the canonical representation of a
Prolog atom. 
Prolog: -charsC:      char **char *. 
The returned encoded string will be converted to a Prolog code-list. 
Prolog: -stringC:      char **char *. 
The returned encoded string will be converted to a Prolog atom.  Prolog
will copy the string to a safe place, so the memory occupied by the
returned string may be reused during subsequent calls to foreign
code. 
Prolog: -string(N)  obsolescentC:      char *Prolog: -addressC:      void **void *. 
     Prolog: -address(TypeName)C:      TypeName ** *. 
     Prolog: -termC:      SP_term_refProlog: [-integer]C:      long F()long.  The value returned will be
converted to a Prolog integer. 
Prolog: [-float]C:      double F()double.  The value returned will
be converted to a Prolog float. 
Prolog: [-atom]C:      SP_atom F()SP_atom.  The value
returned must be the canonical representation of a Prolog atom. 
Prolog: [-chars]C:      char *F()char *.  The returned encoded
string will be converted to a Prolog code-list. 
Prolog: [-string]C:      char *F()char *.  The returned encoded
string will be converted to a Prolog atom.  Prolog will copy the string
to a safe place, so the memory occupied by the returned string may be
reused during subsequent calls to foreign code. 
Prolog: [-string(N)]  obsolescentC:      char *F()char *.  The first N bytes
of the encoded string (not necessarily NULL-terminated) will be copied
and the copied string will be stripped of trailing blanks.  The stripped
string will be converted to a Prolog atom. C may reuse or destroy the
string buffer during later calls. 
Prolog: [-address]C:      void *F()void *. 
(see Creating Prolog Terms), will be converted to a Prolog integer. 
Prolog: [-address(TypeName)]C:      TypeName *F() *. 
     Prolog: [-term]C:      SP_term_ref F()