Download Prolog reference manual

Transcript
ARM PROLOG' s built-in predicates
6.2 Reading in programs
6.2.1 compile(F)
This predicate instructs the system to read in the program which is in file F.
When a directive is read, it is immediately executed. When a clause is read,
it is put after any clauses already read by the system for that procedure.
Clauses which are compiled cannot be accessed by the built-in predicates
retract, listing, Or clause.
6.2.2 consult(F)
This is like compile, except that additional information is stored in the
database to allow certain debugging operations. Clauses which are consulted
may be accessed by the built-in predicates retract, listing, or clause.
6.2.3 [Fl, F2, ..., Fn]
This is a shorthand way of consulting a list of files. Thus:
?- [file1, file2, file3].
is merely a shorthand for
?- consult (file') , consult (file2) , consult (file3) .
6.3 Opening and closing files
6.3.1 see(F)
This predicate makes file F become the current input stream.
6.3.2 seeing(F)
This unifies file F with the name of the current input file.
6.3.3 seen
This closes the current input steam.
6.3.4 tell(F)
This makes file F become the current output stream.
PROLOG
31