Next: , Previous: , Up: cpg-bif   [Contents][Index]


12.3.27 SP_get_byte()

Synopsis

#include <sicstus/sicstus.h>

spio_t_error_code
SP_get_byte(
  SP_stream *stream);

Read a byte from a binary stream.

Arguments

stream

The stream. Must be a binary stream open for input.

Return Value

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.

Description

Note that SP_get_byte() is implemented as a macro and may evaluate the stream argument more than once.

See Also

cpg-ref-SP_get_code. Prolog Streams.


Send feedback on this subject.