Next: cpg-ref-SP_get_code, Previous: cpg-ref-SP_get_atom, Up: cpg-bif [Contents][Index]
SP_get_byte()
#include <sicstus/sicstus.h> spio_t_error_code SP_get_byte( SP_stream *stream);
Read a byte from a binary stream.
The stream. Must be a binary stream open for input.
On success, the byte 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_byte()
is implemented as a macro and may evaluate
the stream
argument more than once.
cpg-ref-SP_get_code. Prolog Streams.