reconsult/1

reconsult(Filename)

Read facts and rules from a text file into the internal database and replace the existing ones.

Remarks

reconsult/1 reads facts and rules from the text file FileName (created by saving a database with the save/1 predicate) and asserts them in the internal database. If the corresponding predicates already exists in the database, reconsult/1 will replace them.

If the file contains any syntactic errors, reconsult/1 generates an error.

Example

p1(1,'a',44.44,"PC","Prolog",[1,2,3,4])
p1(2,'b',-4.444E-98,"---","++++",[])

reconsult("DD.DBA").
--- Contents of "DD.DBA" might be ---
p1(1,'a',44.44,"PDC","Prolog",[5,6,7,8])
p1(2,'b',-4.444E-98,"---","++++",[])
p2(88)
p2(99)