谓词命令序列上的Prolog“运算符预期错误”

时间:2013-05-10 20:11:04

标签: prolog

我的学习材料中这个非常简单的Prolog示例给出了“操作员预期”错误:

greet(alice):- 
        write(‘How are you doin, pal?’).
greet(bob):- 
        write(‘Awfully nice to see you!’).

我错过了什么?

1 个答案:

答案 0 :(得分:3)

与评论中提到的@larsman一样,将替换为'

greet(alice):-
        write('How are you doin, pal?').
greet(bob):-
        write('Awfully nice to see you!').