Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含这样一个列表的文本文件:
[(3,3,0), (3,5,0), (4,4,1), (5,1,0), (6,6,3)].
是否有可以从文件加载此列表的内置 Prolog 谓词?
还是我必须以纯文本形式读取数据,然后自己进行解析?
谓词read/1为您执行此操作。
read/1
好的,那么简单的 open/3 和 read/1 就可以了 :) 抱歉这个愚蠢的问题。