Accessing and redirecting the stream aliases

Author(s): Manuel Carro.

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

Documentation on exports



Associate StreamAlias with an open stream newStream. Returns in OldStream the stream previously associated with the alias. The mode of NewStream must match the intended use of StreamAlias.



Return in Stream the stream associated with StreamAlias.

Documentation on imports

This module has the following direct dependencies: