.de SB
.in +5
..
.de BE
.in \-5
..
.de BI
.ne 3
.ti \-5
..
.NH
BUILT-IN PROCEDURES
.LP
Built-in procedures are also referred to as \fIevaluable predicates\fR.
.NH 2
Input / Output
.LP
A file is referred to by its name, \fIwritten as an atom\fR, eg.
.DS I
	myfile
	\'123\'
	\'fred.data\'
	\'/lib/prolog.lib\'
.DE
.LP
Unless directed otherwise ,input or output refer to standard input and standard
output.
When the terminal is
waiting for input on a new line, the prompt `:' is displayed.
[If the standard input file is not a terminal, no prompt
is displayed]
.LP
Streams are a special type of term. They may be created either directly,
(by calls to 'open' or 'process') or indirectly (by calls to 'see', 'tell'
or 'read_from_this_file') and may refer to a file or to the user's terminal.
Each stream is either for input or output, not both.
.LP
There is a limit of twenty input/output streams that can be open at any one
time.
Three of these streams are reserved for standard input, standard output
and error output.
These reserved streams are identified by the
atoms '\fBuser_input'\fR , \fB'user_output'\fR and \fB'user_error'\fR
respectively.
Normally, they
refer to your terminal, but may be redirected in the usual way in AmigaDOS
by using '<' and '>' in the shell command.
.LP
When the current output stream is closed, standard output becomes the current
output stream. Similarly, when the current input stream is closed,
standard input becomes the new input stream.
.LP
All I/O errors (including trying to use a stream previously closed) cause a
failure of the procedure and warnings are issued on the standard error file.
.LP
At end of file, the built-in predicate "eof" becomes true.
Any more input
requests for a file whose end has been reached causes Prolog to return the atom
"end_of_file".
.LP
One of the advantages of streams is that they may be optionally passed as the
first argument to most input/output predicates.
For example:
.DS I
	print(Stream, word)!
.DE
prints the atom 'word' on the output stream 'Stream'.
If no stream is passed the default, ie the current output/input stream is used.
.LP
However, output to a stream does not necessarily get sent immediately
due to it being buffered.
A stream may be flushed by using the predicate
flush_output. (The standard error stream is usually unbuffered)

.SB
.BI
consult(\fBF\fR)

Instructs the interpreter to read-in the program which is in file
\fBF\fR. When a directive is read it is immediately executed. When a
clause is read it is put after any clauses already read by the
interpreter for that procedure. 
When a file has been consulted, a predicate file(\fBF\fR, \fBProc_List\fR)
is asserted. \fBProc_List\fR is a list of the procedures defined in \fBF\fR.

.BI
unload \fBF\fR

Retracts all procedures defined in \fBF\fR (according to
the contents of file(F, Proc_list).
Also retracts file(F, Proc_list).

.BI
load \fBF\fR

same as consult, except unloads \fBF\fR first, i.e. prevents
redefinition of procedures. It shouldn't matter if \fBF\fR
had not been consulted previously.

.BI
ed \fBP\fR

A listing of procedure \fBP\fR is output to a temporary file.
The text editor is the called to allow the user to
change the definition.
When the editor is terminated, the file is read in
causing the procedure to be redefined if no
syntax errors were found.
If the interpreter discovered syntax errors,
the user is asked if the procedure is to be
re-edited.
If the response is `n', the old definition is restored.
Any other response causes the editor to be invoked
again.

.BI
ef \fBF\fR

edit file \fBF\fR.
The file is not read by Prolog.

.BI
em \fBF\fR

Equivalent to : unload \fBF\fR, ef \fBF\fR, consult(\fBF\fR).

.BI
file(\fBF\fR, \fBProc_list\fR)

Both \fBF\fR and \fBProc_list\fR must be uninstantiated.
\fBF\fR is successively bound to the names of consulted files.
\fBProc_list\fR is bound to the list of procedure names defined
in the respective files.

.BI
read_from_this_file

Unless \fIsee\fR has changed the current input stream, all requests
for input use the standard input file.
Thus, when a read command is executed from a file being loaded
by Prolog, the input will normally come from the standard input
file, not the program file.
\fIread_from_this_file\fR will cause the input to be taken from
the program file instead of the standard input.

.BI
see(\fBX\fR)

If \fBX\fR is an open input stream, then it is made the current input
stream.

If \fBX\fR is an atom, it is taken to be a file name and
.DS I
	- if there is an input stream currently associated with a file
	  of that name then it is made the current input stream.( If
	  more than one input stream is associated with X, one is
	  chosen arbitrarily)
	- otherwise ,that file is opened, a stream created and and set
	  to be the current input stream
.DE

.BI
seeing(\fBF\fR)

\fBF\fR is unified with the name of the current input file.

.BI
seen

Closes the current input stream.

.BI
tell(\fBX\fR)

If \fBX\fR is an open output stream, then it is made the current output
stream.

If \fBX\fR is an atom, it is taken to be a file name and
.DS I
	- if there is an output stream currently associated with a file
	  of that name then it is made the current output stream.( If
	  more than one output stream is associated with X, one is
	  chosen arbitrarily)
	- otherwise, that file is opened, a stream created and and set
	  to be the current output stream
.DE

.BI
telling(\fBF\fR)

\fBF\fR is unified with the name of the current output file.

.BI
told

Closes the current output stream.

.BI
close(\fBF\fR)

The stream corresponding to Stream is closed.
.LP
For upward compatibility, this predicate also accepts an atom as its argument.
If there is a single open stream with this atom as its associated file name,
then this stream is closed.
If there is more than one stream with the same file
name, then one is selected arbitrarily and closed.

.BI
eof or eof(\fBStream\fR)

The current or specified input \fBstream\fR is at end of file.
This becomes true when the end of that input stream has been reached.

.BI
ratom(\fBX\fR) or ratom(\fBStream\fR,\fBX\fR)

The next lexical token on the current or specified input stream is bound
to \fBX\fR.
eg,
.DS I

: ratom(X)?
> fred

X = fred.

: ratom(X)?
> 123

X = 123 % X is an integer

: ratom(X)?
> <=

X = '<='

: ratom(X)?
> ,

X = ','
.DE

.BI
# \fBX\fR

The same as ratom(X) except that if backtracking occurs,
X will be pushed back onto the input stream so that it can be
re-read by subsequent ratoms or #'s.
.br
Warning:
It is dangerous to mix character I/O with #.

.BI
read(\fBX\fR) or read(\fBStream\fR, \fBX\fR)

The next term, delimited by a "fullstop" (ie. a '.' followed by <cr> or
a space), is read from the current or given input stream and unified with 
\fBX\fR. The syntax of the term must accord with current operator declarations.
If a call 'read(\fBX\fR)' causes the end of the stream to be reached, \fBX\fR
is unified with the term "end_of_file". If input comes from the
terminal, the user is prompted by "> ".

.BI
prompt(\fBOldPrompt, NewPrompt\fR)

The current prompt string is bound to \fBOldPrompt\fR, and
\fBNewPrompt\fR becomes the new prompt string.
The goal `prompt(X,@X)' binds the current prompt to X without
changing it.
\fINote:\fR only the `read' prompt is changed.
The system prompt `: ' cannot be changed.

.BI
ask(\fBQuestion, Answer\fR)

The user is prompted by the string (or atom) \fBQuestion\fR.
\fBAnswer\fR is unified with the next lexical token on the input stream.
No newline is printed after Question.

.BI
print(\fBX\fR, ...) or print(\fBStream\fR, \fBX\fR, ...)

\fBprint\fR will accept a variable number of arguments,
printing each term on the
same line of the current or specified output stream.
If an argument is a
string (enclosed in '"') then the string is printed without quotes.
This \fBprint\fR may be used to output messages.
A newline character is appended
to the output. The special character sequences '\\n' and '\\t' are
recognized as newline and tab respectively.

.BI
prin(\fBX\fR, ...) or prin(\fBStream\fR, \fBX\fR, ...)

Same as \fIprint\fR except no newline is appended.

.BI
write(\fBX\fR) or write(\fBStream\fR, \fBX\fR)

The term \fBX\fR is written to the current or specified output stream according
to current operator declarations.

.BI
nl or nl(\fBStream\fR)

A new line is started on the current or specified output stream.

.BI
getc(\fBX\fR) or getc(\fBStream\fR, \fBX\fR)

Unifies \fBX\fR with the next character in the current or given input
stream.

.BI
skip(\fBC\fR) or skip(\fBStream\fR, \fBC\fR)

Skips to just after the next character \fBC\fR in the current or specified
input stream.

.BI
putc(\fBX\fR) or putc(\fBStream\fR, \fBX\fR)

The character \fBX\fR is written to the current or specified output stream.

.BI
tab(\fBN\fR) or tab(\fBStream\fR, \fBN\fR)

\fBN\fR spaces are output to the current or specified output stream.
\fBN\fR may be an integer expression.

.BI
ascii(\fBC\fR, \fBI\fR)

If \fBC\fR is a single character atom, \fBI\fR is instantiated to
the ascii code representing \fBC\fR.
If \fBC\fR is a variable and \fBI\fR is an integer, \fBC\fR is instantiated to
the appropriate single character atom

.BI
rename(\fBF\fR,\fBN\fR)

If file \fBF\fR is currently open, closes it and renames it to \fBN\fR. If \fBN\fR
is `[]', deletes the file.

.BI
current_input(\fBStream\fR)

\fBStream\fR is unified with the current input stream.

.BI
current_output(\fBStream\fR)

	\fBStream\fR is unified with the current output stream.

.BI
current_stream(\fBName\fR, \fBMode\fR, \fBStream\fR)

 \fBStream\fR is a currently open stream on name \fBName\fR in mode
\fBMode\fR where
Mode is either '\fBread\fR', '\fBwrite\fR' or '\fBappend\fR'.
None of the arguments
need be initially instantiated.
This predicate is non-determinate
and can be used to backtrack through all open streams.

The three reserved streams (user_input, user_output, user_error)
are ignored.

A fact of this form is asserted whenever a stream is created
(by open or process) and retracted whenever a stream is closed.

.BI
flush_output(\fBStream\fR)

Flushes the output buffer for the specified \fBstream\fR and thus ensures
that everything written to the stream is sent.
Stream must be a stream open for output.

.BI
input_ready(\fBStream\fR)

succeeds if \fBStream\fR has input waiting to be read

.BI
open(\fBFile\fR, \fBMode\fR, \fBStream\fR)

\fBFile\fR is a filename.
\fBMode\fR is one of the atoms \fB'read'\fB, \fB'write'\fB or \fB'append'\fR.
The 'read option is used for input. The 'write' and 'append'
options are used for output.

current_stream(\fBFile\fR, \fBMode\fR, \fBStream\fR) is then asserted into the
data base.

.BI
select(\fBList\fR, \fBtimeout\fR, \fBReady_stream\fR)

\fBSelect\fR blocks for at most \fBtimeout\fR milli seconds until one of the
input
streams contained in \fBList\fR are ready for reading.
The stream, closest
to the front of the list, that has been found to be ready is then
unified with \fBReady_stream\fR.
If no stream was ready, the call fails.
To block indefinately timeout may be set equal to -1.
Note that this predicate avoids busy waiting.

(Unfortunately this is not available on Sys V Unix)

.BI
set_input(\fBStream\fR)

This makes \fBStream\fR the current input stream.

.BI
set_output(\fBStream\fR)

This makes \fBStream\fR the current output stream.

.BI
stream(\fBS\fR)

Succeeds if \fBS\fR is instantiated to an open stream.
.BE
.NH 2
Arithmetic
.LP
Arithmetic is performed by built-in procedures which take as
arguments \fInumeric expressions\fR and \fIevaluate\fR them.
A numeric
expression is a term built from \fIevaluable functors\fR, integers, reals and
variables. At the time of evaluation, each variable in a numeric
expression must be bound to an integer or real, or, for the interpreter ONLY,
to an numeric expression.
The resultant type of any numeric valuation is an integer except when a
component of the expression is a real.
In this case, the result is also a real.
.LP
Each evaluable functor stands for an arithmetic operation. The
evaluable functors are as follows, where \fBX\fR and \fBY\fR are numeric
expressions:\-
.DS I
\fBX\fR+\fBY\fR addition

\fBX\fR\-\fBY\fR subtraction

\fBX\fR*\fBY\fR multiplication

\fBX\fR/\fBY\fR division

\fBX\fR^\fBY\fR exponentiation (\fBY\fR \(>= 0).

\fBX\fR mod \fBY\fR integer remainder after dividing \fBX\fR by \fBY\fR

\-\fBX\fR unary minus

.DE
The arithmetic built\-in procedures are as follows, where \fBX\fR and \fBY\fR
stand for arithmetic expressions, and \fBZ\fR for some term:
.SB

.BI
\fBZ\fR is \fBX\fR

Numeric expression \fBX\fR is evaluated and the result is unified with \fBZ\fR.
Fails and delivers a warning if \fBX\fR is not a numeric expression.

.BI
\fBX\fR == \fBY\fR

The values of \fBX\fR and \fBY\fR are equal.

.BI
\fBX\fR /= \fBY\fR

The values of \fBX\fR and \fBY\fR are not equal.

.BI
\fBX\fR < \fBY\fR

The value of \fBX\fR is less than the value of \fBY\fR.

.BI
\fBX\fR > \fBY\fR

The value of \fBX\fR is greater than the value of \fBY\fR.

.BI
\fBX\fR <= \fBY\fR

The value of \fBX\fR is less than or equal to the value of \fBY\fR.

.BI
\fBX\fR >= \fBY\fR

The value of \fBX\fR is greater than or equal to the value of \fBY\fR.
.BE
.LP
.NH 2
Comparing Atoms
.LP
The comparison operations described in the previous section
also apply to X and Y
if the are instantiated to atoms.
.NH 2
Convenience
.LP
.SB
.BI
(\fBX, Y\fR)

\fBX\fR and \fBY\fR.

.BI
\fBX\fR | \fBY\fR \fIalso\fR \fBX\fR; \fBY\fR

\fBX\fR or \fBY\fR.

.BI
\fBX\fR = \fBY\fR

Defined as if by clause ` \fBZ\fR = \fBZ\fR. '.

.BI
length(\fBL\fR,\fBN\fR)

\fBL\fR must be instantiated to a list of determinate length. This
length is unified with \fBN\fR.
.BI
member1(\fBX\fR,\fBL\fR)

Succeeds if \fBX\fR can be unified with an element of list \fBL\fR.
This predicate is built in and will not succeed more than once.
.BI
tolower(\fBA\fR, \fBX\fR)

Maps the atom \fBA\fR to lowercase and unifies the result with \fBX\fR.

.BI
bagof(\fBV\fR, \fBP\fR, \fBL\fR)

Find all all terms, \fBV\fR, such that \fBP\fR is true.
Append \fBV\fR to the list, \fBL\fR.
Bagof uses backtracking to find all the solutions to \fBP\fR.
.BE
.NH 2
Extra Control
.LP
.SB
.BI
!
.LP
See earlier description of cut.

.BI
not(\fBP\fR)

If the goal \fBP\fR has a solution, fail, otherwise succeed. It is
defined as if by:\-

.DS I
not(P) :\- P, !, fail.
not(\|_\|).
.DE
.BI
\fBP\fR -> \fBQ\fR | \fBR\fR \fIalso\f\fBR\fR \fBP\fR -> \fBQ\fR; \fBR\fR

Analogous to

.ce
"if \fBP\fR then \fBQ\fR else \fBR\fR"

i.e. defined as if by:
.DS I
\fBP\fR -> \fBQ\fR | \fBR\fR :- \fBP\fR, !, \fBQ\fR.
\fBP\fR -> \fBQ\fR | \fBR\fR :- \fBR\fR.
.DE
.BI
\fBP\fR -> \fBQ\fR

When occurring other than as one of the alternatives of
a disjunction, is equivalent to:

.ce
\fBP\fR -> \fBQ\fR | fail.

.BI
repeat

Generates an infinite sequence of bactracking choices. It
behaves (but doesn't use store!) as if defined by the clauses:
.DS I
repeat.
repeat :\- repeat.
.DE

.BI
fail

Always fails.

.BI
true

Always succeeds.

.BE
.NH 1
Meta-Logical
.LP
.SB
.BI
var(\fBX\fR)

Tests whether \fBX\fR is currently instantiated to a variable.


.BI
nonvar(\fBX\fR)

Tests whether \fBX\fR is currently instantiated to a non\-variable term.

.BI
atom(\fBX\fR)

Checks that \fBX\fR is currently instantiated to an atom (ie. a
non\-variable term of arity 0, other than an integer or real).

.BI
integer(\fBX\fR)

Checks that \fBX\fR is currently instantiated to an integer.

.BI
number(\fBX\fR)

Checks that \fBX\fR is currently instantiated to a real or an integer.

.BI
atomic(\fBX\fR)

Checks that \fBX\fR is currently instantiated to an atom or integer or real.

.BI
functor(\fBT\fR, \fBF\fR, \fBN\fR)

The principal functor of term \fBT\fR has name
\fBF\fR and arity \fBN\fR, where \fBF\fR
is either an atom or, provided \fBN\fR is 0, an integer. Initially,
either \fBT\fR must be instantiated to a non\-variable, or \fBF\fR and \fBN\fR must
be instantiated to, respectively, either an atom and a
non-negative integer or an integer and 0. If these conditions are
not satisfied, an error message is given. In the case where \fBT\fR is
initially instantiated to a variable, the result of the call is
to instantiate \fBT\fR to the most general term having the principal
functor indicated.

.BI
arg(\fBI\fR, \fBT\fR, \fBX\fR)

Initially, \fBI\fR must be instantiated to a positive integer and \fBT\fR to
a compound term. The result of the call is to unify \fBX\fR with the
\fBI\fRth argument of term \fBT\fR. (The arguments are numbered from 1
upwards.) If the initial conditions are not satisfied or \fBI\fR is out
of range, the call merely fails.

.BI
\fBX\fR =.. \fBY\fR

\fBY\fR is a list whose head is the atom corresponding to the principal
functor of \fBX\fR and whose tail is the argument list of that functor
in \fBX\fR. eg.:

.ce
product(0, N, N \- 1) =.. [product, 0, N, N \- 1]

If \fBX\fR is instantiated to a variable, then \fBY\fR must be instantiated
to a list of determinate length whose head is atomic (ie. an
atom or integer).

.BI
name(\fBX\fR, \fBL\fR)

If \fBX\fR is an atom, integer or real then \fBL\fR is a list of the
characters of the name of \fBX\fR. eg.:\-

.ce
name(product, [p, r, o, d, u, c t])

If \fBX\fR is instantiated to a variable, \fBL\fR must be instantiated to a
list of characters. eg.:\-

.ce
name(X, [f, r, e, d])?

\fIname\fR is defined in terms of \fIconcat\fR and \fIchar\fR.


.BI
concat(\fBL\fR, \fBA\fR)

The members of list \fBL\fR are concatenated to form the atom \fBA\fR.
For example,
.DS I
	concat([abc, def], X)?
	X = abcdef

	concat([f, r, e, d, 12], X)?
	X = fred12
.DE
The members of \fBL\fR must be atoms integers or real.
If \fBX\fR is instantiated then its value is compared with
the result of the concatenation.


.BI
char(\fBI\fR, \fBA\fR, \fBC\fR)

The \fBT\fRth character of atom \fBA\fR is \fBC\fR.
\fBI\fR and \fBA\fR must be instantiated.

.BI
\fBX\fR

If \fBX\fR is instantiated to a term which would be acceptable as body
of a clause, the goal \fBX\fR is executed exactly as if that
term appeared textually in place of the \fBX\fR. In particular,
any cut (`!') occurring in \fBX\fR is interpreted as if it occurred in
the body of the clause containing \fBX\fR.
If \fBX\fR is not instantiated as described the clause fails.

.BI
assert(\fBC\fR)

The current instance of \fBC\fR is interpreted as a clause and is added
to the current interpreted program (with new private variables
replacing any uninstantiated variables). The position of the new
clause within the procedure concerned is implementation-defined.
\fBC\fR must be instantiated to a non-variable.

.BI
asserta(\fBC\fR)

Like `assert(\fBC\fR)', except that the new clause becomes the first
clause for the procedure concerned.

.BI
assertz(\fBC\fR)

Like `assert(\fBC\fR)', except that the new clause becomes the last
clause for the procedure concerned.

.BI
clause(\fBP\fR, \fBQ\fR)

\fBP\fR must be bound to a non\-variable term, and the current
interpreted program is searched for clauses whose head matches \fBP\fR.
The head and body of those clauses are unified with \fBP\fR and \fBQ\fR
respectively. If one of the clauses is a unit clause, \fBQ\fR will be
unified with `true'.

.BI
retract(\fBC\fR)

The first clause in the current interpreted program that matches
\fBC\fR is erased. \fBC\fR must be initially instantiated to a non\-variable,
and becomes unified with the value of the erased clause. The
space occupied by the erased clause will be recovered when
instances of the clause are no longer in use.

.BI
retractall(\fBP\fR)

All clauses in the current interpreted program whose head matches
\fBP\fR are `retract'ed. \fBP\fR must be bound to a non\-variable term.

.BI
pp \fBA\fR

Lists in the current output stream all the interpreted clauses
for predicates with name \fBA\fR, where \fBA\fR is bound to an atom.

.BI
listing or listing(\fBStream\fR)

Lists on the current or specified output stream all the clauses in the
current interpreted program.

.BI
numbervars(\fBX\fR, \fBN\fR, \fBM\fR)

Unifies each of the variables in term \fBX\fR with a special term, so
that `write(\fBX\fR)' prints each of those variables as `_\fBI\fR', where the
\fBI\fRs are consecutive integers from \fBN\fR to \fBM\fR\-1.
\fBN\fR must be instantiated
to an integer.

.BI
ancestors(\fBL\fR)

Unifies \fBL\fR with a list of ancestor goals for the current clause.
The list starts with the parent goal and ends with the most
recent ancestor coming from a `call' in a compiled clause.

.BI
subgoal_of(\fBS\fR)

The goal `subgoal_of(\fBS\fR)' is equivalent to the sequence of goals:\-

ancestors(\fBL\fR), in(\fBS\fR, \fBL\fR)

where the predicate `in' successively matches its first argument
with each of the elements of its second argument.
.BE
.NH 2
Environmental
.LP
.SB
.BI
backtrace or backtrace(\fBN\fR)

Causes the parent goals and their arguments to be displayed starting
with the most recent goal.
If an argument is supplied, this
instructs prolog to limit the depth of this and future backtraces to \fBN\fR.
This depth currently defaults to 5.
Backtrace(0) is thus a means whereby users may turn off the automatic
backtrace generated after user warnings.

.BI
trace \fBP\fR \fIalso\fR trace [\fBPList\fR]

Enable tracing of single procedure \fBP\fR or a list of
procedures.
For example, to trace all the procedures defined in file `fred',
type:

.ce
file(\fBfred\fR, \fBL\fR), trace \fBL\fR!

.BI
untrace \fBP\fR \fIalso\fR untrace [Plist]

Disable tracing of a single procedure \fBP\fR
or of a list of procedures, \fBPlist\fR.

.BI
op(\fBPriority\fR, \fBType\fR, \fBName\fR)

Treat name \fBName\fR as an operator of the stated
\fBType\fR and \fBPriority\fR.
\fBName\fR may also be a list of names in which
case all are to be treated as operators of the stated \fBType\fR and
\fBPriority\fR.

If \fBName\fR is already an operator or list of operators, \fBPriority\fR
and \fBType\fR are successively bound to the priority and type of \fBName\fR.

.DS I
for eg.
	: op(600, xfx, if)!	% define infix operator

	: op(P, T, infix if)?

	P = 600
	T = xfx
.DE

.BI
profiling

once this predicate is called profiling is enabled. If profiling is
already on, each clause is reinitiallised.

.BI
profile or profile(\fBF\fR)

Profiling information gathered after a call to profiling, is displayed.
Without an argument all user defined clauses are shown. With an
argument, only the clauses associated with file F are given. The
latter call is often more convenient because it preserves the clause
ordering supplied by the user whereas the former does not.

.BI
profile1(\fBA\fR)

Shows profiling information for all the interpreted clauses for
predicates with name A, where A is bound to an atom.

each clause is displayed in the following form :

.DS I
	calls fails exits	cputime (seconds)
	a :-
		exits	a1,
		  "	a2,
		  "	.
		  "	.
		  "	an.
.DE

The fail parameter is incremented every time a clause is called and
does not exit. Note that the sum of fails and exits may not equal
calls, because a clause may exit more than once due to backtracking.

If a clause is never called, only its head is shown, marked by an
asterix.

.BI
save \fBF\fR

The system saves the current procedure definitions
in the system into file \fBF\fR.

.BI
statistics

Display on the terminal statistics relating to  stack  usages, successful
and total unifications.

.BE
.NH 2
Access to AmigaDOS
.LP
.SB
.BI
cputime(\fBT\fR)

The variable \fBT\fR is instantiated to the elapsed user time in 1/HZ
seconds since an arbitrary (fixed) point in the past

.BI
process(\fBShellCommand\fR, \fBIstream\fR , \fBOstream\fR)

\fBShellCommand\fR is an atom or string which is passed to a shell to
be executed asynchronously as an ordinary AmigaDOS command.
\fIThe two arguments refer to the input and output of the created process\fR.

if Istream is a:
.DS I
Stream - ShellCommand takes its input from this stream
Var    - Process creates a new stream, binds it to Istream and
	 instructs ShellCommand to use it for standard input.
	 Current_stream(ShellCommand, write, Stream) is
	 then asserted into the data base.
.DE

if Ostream is a:
.DS I
Stream - ShellCommand sends its output to this stream
Var    - Process creates a new stream, binds it to Ostream and
	 instructs ShellCommand to use it for standard output.
	 Current_stream(ShellCommand, read, Stream) is
	 then asserted into the data base.
.DE

Note :	Either Istream or Ostream (or both) may be the anonymous variable ('_')
	if no stream is required.

.BI
sh

Suspend Prolog and begin a new shell.
When the shell is terminated, by typing ^\, the Prolog session will resume.
If your system has more than one shell available, it is possible to
specify which shell is to be used by assigning the name of the
shell variable "SHELL" in the environment.

.BI
system(\fBShellCommand\fR)

\fBShellCommand\fR is an atom or string which is passed to
a shell to be executed as a normal AmigaDOS command.

.BI
help and help(\fBX\fR)

Execution of \fIhelp!\fR will print a list of subjects for
which you can receive help.
\fIhelp(X)\fR, where X is from the list printed above will
print the manual entry for X.
.BE
