Реферат: Базы и банки знаний

process(1):-

write("Enter name "),

readln(Name),

write("Enter authors "),

readlist(List),

write("Enter izdanie "),

readln(Izd),

write("Enter god "),

readint(God),nl,

dbassert(kniga(Name,List,Izd,God)),

write(Name,"has been added to a database."),nl,!,

write("Press space bar."),

readchar(_),!.

/* Удаление информации о книге */

/*если запись существует*/

process(2):-

write("Enter name "),

readln(Name),

dbretract(kniga(Name,_,_,_)),

write(Name,"has been deleted from the DATABASE."),

nl,!,

write("Press space bar."),

readchar(_),!.

/*если запись не существует*/

process(2):-

write("Can't find that book in the database."),nl,

closefile(datafile),

closefile(indexfile),nl,!,

write("Press space bar."),

К-во Просмотров: 727
Бесплатно скачать Реферат: Базы и банки знаний