Prolog - ASSERT and RETRACT

Posted by KP65 on Stack Overflow See other posts from Stack Overflow or by KP65
Published on 2010-03-12T19:27:01Z Indexed on 2010/03/13 13:45 UTC
Read the original article Hit count: 746

Filed under:
|

I was wondering, I am aware you can use assert to add facts or rules or whatever if you have declared the predicate to be -:dynamic, but this only allows the changes that are made to be kept in that session only, e.g. if you close the prolog window then the database changes are lost.

So I was wondering, is there any way of making it so that the assert and retract predicates can make permanent changes to the prolog .pl file?

Thanks

© Stack Overflow or respective owner

Related posts about prolog

Related posts about swi-prolog