我正在尝试导入library(readutil)
模块以从我的文件中读取一行。但是,当我尝试以下操作时:
:- use_module(library(readutil)).
read_from_file(File) :-
open(File,read,Stream),
read_line_to_codes(Stream,Codes),
write(Codes),
close(Stream).
我得到错误:
error(existence_error(procedure,read_line_to_codes/2),read_from_file/0)
如何正确导入该模块?模块描述在这里:http ://www.swi-prolog.org/pldoc/man?section=readutil