Реферат: Базы и банки знаний
dbretract(kniga(Name,_,_,_)),nl,
dbassert(kniga(Name,List,Izd,God1)),
write(Name,"has been modified in database."),nl,!,
write("Press space bar."),
readchar(_),!.
/*если запись не существует*/
proc(5):-
write("Can't find that book in the database."),nl,
closefile(datafile),
closefile(indexfile),nl,!,
write("Press space bar."),
readchar(_),!.
/*добавление списка авторов*/
/*если запись существует*/
proc(2):-
nl,write("Запрос: "),nl,
write(" Название книги: "),
readln(Name),
dbread(kniga(Name,List,Izd,God)),nl,
write(" ",Name),nl,
writelist(List),nl,
write(" ",Izd),nl,
write(" ",God),nl,!,
write("Enter authors: "),
readlist(List1),
append(List,List1,List2),
dbretract(kniga(Name,_,_,_)),
dbassert(kniga(Name,List2,Izd,God)),
write(Name,"has been modified in database."),nl,!,