prolog中未定义的过程错误

时间:2015-04-25 16:25:19

标签: prolog logic

我是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')
    }.

0 个答案:

没有答案