12.3.69 SP_put_code()

Synopsis

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

Write a character code to a text stream.

Arguments

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

Return Value

On success, the written character 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_code() 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_byte. Prolog Streams.


Send feedback on this subject.