save/1

save(Filename)

Save the contents of the internal database.

Remarks

Saves the internal database predicates in the text file that FileName names. save/1 saves a clause on each line in the file. The file can later be read into memory with the consult/1 or reconsult/1 predicates. The text file can also be inspected and manipulated using the editor.

Example

fact1(1,"fact1",[1,2,3]).
fact1(2,"fact2",[1,3]).
fact1(3,"fact2",[3,2,1]).
fact2(1,"one").
fact2(1,"one once more").
fact2(2,"two").
--- Dialog ---
save("con").
fact1(1,"fact1",[1,2,3])
fact1(2,"fact2",[1,3])
fact1(3,"fact2",[3,2,1])
fact2(1,"one")
fact2(1,"one once more")
fact2(2,"two")
Yes