Next: cpg-ref-SP_get_current_dir, Previous: cpg-ref-SP_get_byte, Up: cpg-bif [Contents][Index]
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.
The stream. Must be a text stream open for input.
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.