0

我正在使用 Turbo prolog 动态数据库。所以这是我的数据库制作以及包含代码的自由变量错误。

domains
song = song(songName,songGenre,songRelease,singerName,likes,dislikes)
movie = movie(movieName,releaseDate,movieGenre,leadActor,leadActress,director,ratings)

database
project(song,movie)

错误代码是:-


admin(1):-
write("Enter Song Name :"),readln(A),
write("Enter Song Genre :"),readln(B),
write("Enter Release Date :"),readln(C),
write("Enter Singer Name :"),readln(D),
write("Enter Likes :"),readreal(E),
write("Enter DisLikes :"),readreal(F),
%next line gives me the error
assertz(project(song(A,B,C,D,E,F),movie(_,_,_,_,_,_,_))),
save("project.txt").
admin(1).

所以如果有人能帮忙

4

0 回答 0