Go to the first, previous, next, last section, table of contents.


Accessing and redirecting the stream aliases

Author(s): Manuel Carro.

Version: 1.11#222 (2004/5/24, 13:8:7 CEST)

Version of last change: 1.7#52 (2001/1/26, 15:34:13 CET)

This library allows the redefinition of the files to which the special streams user_input, user_output, and user_error point to. On startup they point to the standard input, standard output, and standard error, in Unix style (Windows users may find that standard error stream does not work properly). Changing the file pointed to is useful for, e.g., redirecting the place to which the Prolog's standard error stream goes from within Prolog (e.g., to start a log file).

Usage and interface (io_alias_redirection)

Documentation on exports (io_alias_redirection)

PREDICATE: set_stream/3:

Usage: set_stream(StreamAlias, NewStream, OldStream)

PREDICATE: get_stream/2:

Usage: get_stream(StreamAlias, Stream)


Go to the first, previous, next, last section, table of contents.