我是Prolog的新手,我有未知的错误! 这是错误:
ERROR: sa/0: Undefined procedure: {}/1
Exception: (7) {s=abeer-> (parent(ahmad, abeer)->write('The father is Ahmad \n');write('no father !'));write('Nothing \n')} ?
这是代码:
male(ahmad).
female(abeer).
parent(ahmad,abeer).
sa:-
write('Enter your car: \n'),
read(FE),
{ FE = abeer
-> ( parent(ahmad,abeer)
-> write('The father is Ahmad \n')
; write('no father !')
)
; write('Nothing \n')
}.