[[
✎ pl:prolog:pllib:consulting_file
]]
aiWiki
Pokaż stronę
Ostatnie zmiany
Indeks
Zaloguj
Ta strona jest tylko do odczytu. Możesz wyświetlić źródła tej strony ale nie możesz ich zmienić.
====== Consulting file ====== {{tag>file read/write memory}} ===== Description ===== Consulting a file **Source**: The Art of Prolog ===== Download ===== Program source code: {{consulting_file.pl}} ===== Listing ===== <code prolog> /* consult_(File) :- The clauses of the program in the file File are read and asserted. */ consult_(File) :- open(File,read,DD), consult_loop(DD), close(DD). consult_loop(DD) :- repeat, read(Clause), process(Clause,DD)), !. process(Clause,DD) :- at_end_of_stream(DD). process(Clause,DD) :- assertz(Clause), fail. % Program 12.9: Consulting a file </code> ===== Comments ===== RTERR: /prolog-pllib-consulting_file.pl:6:8: Syntax error: Illegal start of term
pl/prolog/pllib/consulting_file.txt
· ostatnio zmienione: 2019/06/27 15:50 (edycja zewnętrzna)
Pokaż stronę
Poprzednie wersje
Menadżer multimediów
Do góry