Next: cpg-ref-SP_unify, Previous: cpg-ref-SP_unget_byte, Up: cpg-bif [Contents][Index]
SP_unget_code()#include <sicstus/sicstus.h> spio_t_error_code SP_unget_code( SP_stream *stream, int item);
Push back a character so it can be read again by subsequent read operations.
The stream. Must be a text stream open for input.
The character to push back. This must be the same character that was
most recently read from stream, e.g. with
SP_get_code(). As a special case, -1 can be put back if the
last read operation returned end of file, i.e.,
SPIO_E_END_OF_FILE.
On success, the character has been pushed back and will be read by the
next read operation. SPIO_S_NOERR or some other success code is
returned.
On failure, returns an error code.
cpg-ref-SP_get_code. Prolog Streams.