Section "session"

Unless inside a browser, Dogelog Player can be invoked from the command line. If a Prolog text <text> is supplied the Prolog system goes into scripting mode. In scripting mode, the Prolog system consults the Prolog text and then exits the Prolog system. The consulted Prolog text has access to the arguments <arg1> .. <argn> via the Prolog flag argv.

dogelog <text> <arg1> .. <argn>

If no Prolog <text> is supplied the Prolog system enters a Prolog top-level that consists of a read eval print loop (REPL). The Prolog system will read queries and show answer substitu-tions until it encounters a stream end of file (EOF) or the atom “end_of_file” in its input. The REPL will use some ASCII coloring to distinguish input/output.

The following session predicates are provided:

current_output(S): [ISO 8.11.2]
The built-in succeeds in S with the current output.
current_error(S):
The built-in succeeds in S with the current error.
current_input(S): [ISO 8.11.1]
The built-in succeeds in S with the current input.
set_output(S): [ISO 8.11.4]
The built-in succeeds. As a side effect the current output is set to S.
set_error(S):
The built-in succeeds. As a side effect the current error is set to S.
set_input(S): [ISO 8.11.3]
The built-in succeeds. As a side effect it sets the current input to S.
initialization(G):
The goal G is scheduled for later execution.

Kommentare