read/1

read(Term)

Read a term

Remarks

read/1 reads a term from the current input device. However, the term must be in exactly the same format as if it were written out by write/1 from a single variable. read/1 is normally used to access facts placed in disk files.

Example

my_consult(FileName) :-

see(FileName),

repeat,

read(Term),

assertz(Term),

eof.