12.3.68 SP_put_byte()

Synopsis

     #include <sicstus/sicstus.h>
     
     spio_t_error_code
     SP_put_byte(
       SP_stream *stream,
       int item);

Write a byte to a binary stream.

Arguments

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

Return Value

On success, the written byte 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_put_byte() is implemented as a macro and may evaluate the arguments more than once. For the same reason, no error checking is performed on the arguments.

See Also

cpg-ref-SP_put_code. Prolog Streams.


Send feedback on this subject.