【发布时间】:2013-04-07 15:39:07
【问题描述】:
在序言中,如果我断言一些事实,例如:
assert(boy(john4)).
assert(boy(john3)).
assert(boy(john2)).
assert(boy(john1)).
我怎样才能将这个事实保存在文件中?
【问题讨论】:
-
link 我找到了它并且它是正确的:)
-
您可能对this Question 感兴趣,其中一个答案讨论了您找到的链接中使用的过时的 tell/1, tell 机制的替代方案。还 SWI-Prolog has its own mechanism 用于保存解释器状态(但您没有指定您感兴趣的 Prolog)。
标签: prolog prolog-assert