\=   t1 \= t2.
succeeds if two terms t1 and t2 are NOT unifiable,
but fails if they are. see also t1 = t2.

true. 
succeeds once, but fails on backtracking.

op(P, "op").
defines operator op with precedence 1< P< 256.
A higher precedence means tighter binding!
P even/uneven means association to the left/right. 
op will be both prefix (op 7) and infix (7 op 7).

oplist.
lists all operators and their precedences on the
current output.

+  (addition)
operator symbol, precedence 50

-  (subtraction)
operator symbol, precedence 50
associates to the left: 
a - b - c = (a - b) - c

*  (multiplication)
operator symbol, precedence 70

/ (integer division, truncates towards 0)
operator symbol, precedence 70
associates to the left: 
a / b / c = (a / b) / c

mod  (remainder, (-8) mod 6 =:= -2)
operator symbol, precedence 70
associates to the left: 
a mod  b mod  c = (a mod b) mod  c

cls (Part). 
clears your screen, Part = 0 (whole screen),
1 (top), 2 (bottom), 3 (cursor line) or
4 (cursor + rest of line).

ink (Colour).
as in Basic.

paper (Colour).
as in Basic.

under (On)
as in Basic, On = 1: on, 0: off

csize (Width, Height).
as in Basic.

at (Xpos, Ypos).
as in Basic.

window (Width, Height, Xorigin, Yorigin)
changes display window. Without QRAM you are 
prevented from overlapping the help window.

trace. 
starts tracing. trace([G1,...,Gn]) sets the 'trace 
list' (but does not start tracing), trace([]) resets it. 

notrace.
stops tracing (but does not reset the trace list).

tracing (X).
X is the trace list, fails if there is none.

repeat.   @                 
succeeds always, even on backtracking.

fail.
fails.

exit.
exits, closing all open files.

stop.
aborts the current computation by making all
goals fail. 

!.
the cut 'operator', succeeds once but fails on 
backtracking, jumping to its parent goal.
Ancestor cut !(Goal) backtracks to the youngest
ancestor unifiable with Goal. 

ancestor(X, N).
X is the N'th ancestor of the current goal. 

predecessor (X, N)
in the backtrack stack, X is N frames under the
current goal.

=   <t1> = <t2>.
unifies two terms <t1> and <t2> i.e. performs
the most general substitution making them equal.
fails if there is no such substitution.

==   <t1> == <t2>
<t1> and <t2> are identical.

\==  <t1> \== <t2>
<t1> and <t2> are not identical.

var(<term>).
<term> is a variable

nonvar(<term>).
<term> is not a variable

integer(<term>).
<term> is a number

atom(<term>).
<term> is a constant or a string

atomic (<term>)
<term> is a variable, constant, string or a number

listing.
writes the current program to the current output;
listing(<constant>) or listing("<operator>")
lists only the corresponding clauses. 

see ("<filename>").
opens <filename> and makes it the current input
use complete filenames (e.g. see("flp1_read_lijst")).
the special filename "screen" denotes the main window
and is the default input.

tell ("<filename>").
opens <filename>, truncating it if it existed,
and makes it the current output. 

seen. 
closes the current inputfile and makes "screen"
the current input. 

told.
closes the current output file, making "screen" 
the current output.
 
seeing(X)
X is the name of the current input file.

telling(X)
X is the name of the current output file.
 
consult ("<filename">). consult("screen").
reads a program from the file "filename", adding its 
clauses at the end of the current program. The file 
may contain queries, even nested ?consult("...") ones.
The consultation continues even if they fail.

read (<term>).
skips any leading comma, point or question mark; then
reads the next term from the current input and unifies 
<term> with it, succeeding or failing accordingly.
in case of a syntax error it complains and tries to 
read the next term.

write (<term>).
writes <term> on the current output, omitting 
the quotes if <term> is a string.

display (<term>).
writes <term> on the screen. cf. write(X)

get (X)
gets the next printable input character from the 
current input. If it is called after a 'read(Term)' 
it will ignore any white space after Term.

get0 (X)
as get (X), but gets any character (exept, alas, 0)

ttyget (X).
gets the next character from the keyboard, even CTRL `.

skip (C).
skips all characters on the current input until
is sees C. a subsequent get(X) will give
X = C; you can use skip (X) to 'look ahead'

nl.
writes a newline character (10) on the current output.

ttynl.
starts a new line on the screen. cf. nl.

put (C).
writes C on the current output.

ttyput (C).
writes C on the screen.

tab (N).
writes N (< 80) spaces on the current output.

ttytab (N)
writes N (<80) spaces on the screen.

string (Str, List)
List is the list of characters in String.

name (Const, List)
List is the list of characters in the name of Const.

basic("command").  (under recent QRAM versions only)
switches to SuperBasic and types "command" 
You can use this e.g. for BEEPing.
if Basic forgets to reanimate prolog, use F1 S<top>

clause(G, [B])   @
B is the body of a clause whose head unifies with G

assert ([H,B]). or assert([H]).
asserts the clause H <- B. (or H.) at the end 
of the program.

asserta ([H,B]). or asserta([H]).
asserts the clause H <- B. (or H.) at the 
beginning of the program.

qjump.
you have QJUMP's pointer interface installed 

retract (H, [B]).      @
removes the first clause unifying with H <- B.

abolish (<constant>) .  (fails)
or abolish ("<constant>"),
erases the corresponding clauses and stops.

new.          (fails)
removes all clauses and cancels all operators.
new ("<filename>") will then try to consult the
boot file and the program <filename>.

 
system (P(..Xi...))   @
P(..Xi..) is a system predicate.

help (P(....Xi...)) or help("P").   @
you just asked for it.

functor (Term, F, A).
Term has principal functor F and arity A.
N.B. functor([a|b], F, A) fails.

arg (N, Term, Tn)
Tn is the Nth argument of Term.
N.B. arg(2,[a|b],b) succeeds.

heap (N).
there are N free bytes left in the heap.

stack (N).
there are N free bytes left on the stack

time (N).
N seconds have gone since 1 Jan 1961.

fount("<filename>").
loads a fount from the file <filename>
this may be useful if you want special operator
symbols. "fount." returns to the original QL fount.     

:=   Value := Term.
Term is evaluated and the result is
unified with Value. If Term contains an
uninstantiated variable, the system complains.
  
=:=  Term1 =:= Term2
Both terms are evaluated and their
values are equal.

=\=  Term1 =\= Term2
Both terms are evaluated and their
values are unequal.

<  ;  <=    (precedence 30)
less; less or equal.

>  >=       (precedence 30)
greater  ; greater or equal.


