A  program  is made up of a sequence of clauses, possibly interspersed with
directives  to  the interpreter.  The clauses of a procedure do not have to
be  immediately  consecutive, but remember that their relative order may be
important.   The text of a program is normally created separately in a file
(or files), using the text editor.

To input a program from a file file inside Prolog, give the command:-

                                   load file!

which  will  instruct  the interpreter to read-in the program.  If the file
name  contains  characters  such  as  '.', its name is "prog.pl" say, it is
necessary to give the complete filename between quotes.

Any  characters following the '%' character on any line are treated as part
of a comment and are ignored.

When a file is loaded, a predicate of the form

                         file(FileName, ProcedureList)

is becomes true.  FileName is the name of the loaded file and ProcedureList
is  a  list  of  the names of the procedures defined in the file.  When the
same  file  is  loaded  a second time, the definitions of the procedures in
ProcedureList  are  first removed so that clauses in the procedures are not
duplicated.

Clauses  may  also  be typed in directly at the terminal, (although this is
only recommended if the clauses will not be needed permanently, and are few
in number).
