lags is a
bitwise or of the constants below. These flags map to options for write_term/2.
PL_WRT_QUOTED
PL_WRT_IGNOREOPS
PL_WRT_NUMBERVARS
PL_WRT_PORTRAY
PL_WRT_CHARESCAPES
PL_WRT_NO_CHARESCAPES
- The
PL_WRT_NO_CHARESCAPES
does not map to a write_term/2 option. If one ofPL_WRT_CHARESCAPES
orPL_WRT_NO_CHARESCAPES
is specified, character escapes are (not) applied. If neither is specified the default depends, like for write/1, on the character_escapes flag on the moduleuser
.231Prior to version 9.1.6 the default (no flag) was to escape the quotes and the backslash (
).\
PL_WRT_BACKQUOTED_STRING
PL_WRT_ATTVAR_IGNORE
PL_WRT_ATTVAR_DOTS
PL_WRT_ATTVAR_WRITE
PL_WRT_ATTVAR_PORTRAY
PL_WRT_BLOB_PORTRAY
PL_WRT_NO_CYCLES
PL_WRT_NEWLINE
PL_WRT_VARNAMES
PL_WRT_BACKQUOTE_IS_SYMBOL
PL_WRT_DOTLISTS
PL_WRT_BRACETERMS
PL_WRT_NODICT
PL_WRT_NODOTINATOM
PL_WRT_NO_LISTS
PL_WRT_RAT_NATURAL
PL_WRT_CHARESCAPES_UNICODE
PL_WRT_QUOTE_NON_ASCII
PL_WRT_PARTIAL
For example, to print a term to user_error
as the
toplevel does, use
PL_write_term(Suser_error, t, 1200, PL_WRT_QUOTED|PL_WRT_PORTRAY| PL_WRT_VARNAMES|PL_WRT_NEWLINE)
12.9.4 Foreign stream error handling
- int Sferror(IOSTREAM *s)
- Returns
TRUE
if the stream is in an error condition,FALSE
if the stream is valid and in normal condition and -1 if the stream is invalid. - void Sclearerr(IOSTREAM *s)
- Clear the error state of a stream. This includes the end-of-file state, pending warnings and errors and timeout.
- int Sseterr(IOSTREAM *s, int which, const char *message)
- Set an error or warning state on the stream. The which
argument is one of
SIO_WARN
orSIO_FERR
. This