SP_get_code() #include <sicstus/sicstus.h>
spio_t_error_code
SP_get_code(
SP_stream *stream);
Read a character code from a text stream.
On success, the character just read will be returned, cast to a
spio_t_error_code. The value returned on successful return will
never be negative.
On failure, returns an error code, recognizable with
SPIO_FAILED(). Error codes are always negative.
Note that SP_get_code() is implemented as a macro and may evaluate
the stream argument more than once.
cpg-ref-SP_get_byte. Prolog Streams.