XSB has two levels of I/O: a higher level that supports DEC-10 and ISO-like file and stream handling; and a lower level that is based in XSB I/O ports. This section describes higher-level I/O, while the lower-level is described in Volume 2 Section 1.5 of this manual. Presently, higher-level input and output operations bind a file identifier to the current input or output stream. The semantics of the operations here is basically that of Edinbourough Prolog's see/1 and tell/1. However, this interface has been extended to provide portability for programs written using the ISO standard, and includes predicates such as open/3, close/1, write/2 and so on.
The default input and output streams are internally denoted by userin and userout (the user accesses them both via the name ``user'', and they refer to the process'es standard input and standard output streams).