Many, but not all, C functions return one of the codes
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 (an integer) describing the error condition.
The function SP_error_message()
returns a pointer to the diagnostic
message corresponding to a specified error number.
See mpg-ref-ove for a description of the conventions observed in the Reference Pages for Prolog predicates. C function Reference Pages differ primarily in the synopsis. Also, the Reference Page for each C function documents its return values.
The following function annotations are used in the Reference Pages: