Input and Output of Terms

KEY read(X) The next term, delimited by a full stop (i.e. a "." followed by a carriage-return or a space), is read from the current input stream and unified with X. The syntax of the term must accord with current operator declarations. If a call read(X) causes the end of the current input stream to be reached, X is unified with the term 'end_of_file'. Further calls to read for the same stream will then cause an error failure. write(X) The term X is written to the current output stream according to current operator declarations. display(X) The term X is displayed on the terminal in standard parenthesised prefix notation. writeq(Term) Similar to write(Term), but the names of atoms and functors are quoted where necessary to make the result acceptable as input to read. print(Term) Print Term onto the current output. This predicate provides a handle for user defined pretty printing. If Term is a variable then it is written, using write(Term). If Term is non-variable then a call is made to the user defined procedure portray(Term). If this succeeds then it is assumed that Term has been output. Otherwise print is equivalent to write.