Quintus Prolog Manual
There are three ways a Prolog system can be invoked:
% <program> <Prolog's arguments>
% <program> <Prolog's arguments> + <emacs' arguments>
% <program> <Prolog's arguments> +z <user's arguments>
Only one of + or +z is possible on one command line.
All command line arguments beginning with a + are reserved for system arguments. If user arguments need to begin with a +, they should be given as ++ instead. The ++ is converted into a single + by the argument handling routines, and thus, to the user's code, only the single + argument is visible. An exception to this is when an argument is given following a +z option in which case no conversion is done.
Runtime systems do not interpret system arguments; they treat all arguments as user's arguments.
There can be any number of +l and +L arguments. In Release 3, invoking a saved-state, an executable QOF-file, as a Unix command causes the corresponding Prolog executable, the one from which the saved-state was created, to be invoked with the arguments "+L <saved-state>".
The user's arguments are accessible in Prolog via unix(argv(ArgList)), which returns a list of all the user's arguments. For example, if Prolog is invoked by the command (A), then the Prolog goal (B) returns (C):
% prolog ++file1 -file2 (A)
| ?- unix(argv(ArgList)). (B)
ArgList = ['+file1','-file2'] (C)
Once invoked, the default prolog looks in your home directory for a file named prolog.ini, and if it finds one, loads it. Stand-alone programs also look for and load prolog.ini. Runtime systems do not.
Typically, prolog.ini files are used to define file search paths, library directories, and term expansions.
If the +f option is specified, the initialization file prolog.ini is not loaded.
To exit from the Prolog system, either type
| ?- halt.
or your end-of-file character. The end-of-file character is ^d by default. You will use a different command set to exit Prolog running under Emacs; see {manual(d-2-2)}. The commands for exiting are as follows:
without Emacs: type '^d' (or '^C e'). You may
also execute the goal halt/0.
with GNU Emacs: type '^c ^d' (or 'Escape-X
exit-emacs').
with QUI: Use Interrupt button in main window.
Select Exit.
If you would like to pause Prolog while keeping the job in the background:
without Emacs: type '^Z'. with GNU Emacs: type '^X^Z'. with QUI: iconify the main window
contact: product
support sales information