SP_PATH
is used as a shorthand
for the SICStus Prolog installation directory,
whose default location for SICStus 3.9.1 is
/usr/local/lib/sicstus-3.9.1
) for UNIX and
C:\Program Files\SICStus Prolog 3.9.1
for Windows.
See Environment Variables.
<sicstus/sicstus.h>
.
The value of many support functions is a return code which is one of
SP_SUCCESS
for success, SP_FAILURE
for failure,
SP_ERROR
if an error condition occurred, or if an uncaught
exception was raised during a call from C to Prolog.
If the value is SP_ERROR
, the macro SP_errno
will return a
value describing the error condition:
int SP_errno
The function SP_error_message
returns a pointer to the diagnostic
message corresponding to a specified error number:
char *SP_error_message(int errno)
If a foreign function is specified to return an encoded string, an
exception will be raised if, on return to Prolog, the actual string is
malformed (is not a valid sequence of UTF-8 encoded characters). The
exception raised is
representation_error(...,...,mis_encoded_string)
.