Prolog provides two classes of predicates for input and output: those that handle individual characters, and those that handle complete Prolog terms.

The following predicates have been added for I/O at the Prolog level:

Input and output happen with respect to streams. Therefore, this section discusses predicates that handle files and streams in addition to those that handle input and output of characters and terms.

In Quintus Prolog Release 3, the I/O system has been redesigned. Streams are now record based by default, for an increase in efficiency and portability. This leads to increased efficiency in opening streams, putting characters, flushing output, and in character I/O operations involving lines (end of line, new line, skipping lines). For a description of the new model, see fli-ios-iom. Combining Prolog and C I/O operations on the same stream is facilitated by a more complete set of functions.