PLOGHELP CONSULT                                Robert Duncan, July 1993

Reading procedure definitions from a file.

    ?- consult(_____Files).


consult/1 reads clauses and executes directives from a set of _____Files.
When a clause is read, it is added to the database _____after any clauses
which already exist for that procedure. When a directive is read, it is
executed immediately.

_____Files can be a single filename or a list of filenames to be consulted in
order. Each filename must be an atom. If there is no file with the given
name, and the name has no extension, consult/1 will append the standard
Prolog file extension '.pl' to the name and try reading from that. Thus
if there is no existing file called 'program', the goal

    ?- consult(program).

can be used as shorthand for the goal

    ?- consult('program.pl').

If the special file 'user' is specified, clauses and goals will be read
from the terminal; Prolog will prompt with a '| ' in this case. Terminal
input can be terminated with the usual end-of-file indicator.

A shorthand form of consult/1 uses the list notation:

    ?- [File|Files].

which is identical to

    ?- consult([File|Files]).

consult/1 is itself an abbreviation for a call to the compiler in
_______consult mode: for full details see ________PLOGHELP * _______COMPILE.


--- _______________________C.all/plog/help/consult
--- _________Copyright __________University __of ______Sussex _____1993. ___All ______rights _________reserved.
