【发布时间】:2011-05-30 03:59:36
【问题描述】:
我正在努力学习 SWI prolog, 但是当我认为它应该成功时,我的简单程序失败了。
%My code:
orthogonal((X1,Y1,Z1),(X2,Y2,Z2)) :- (X1*X2)+(Y1*Y2)+(Z1*Z2)==0.
integerVector((X,Y,Z)) :- integer(X),integer(Y),integer(Z).
?-orthogonal((1,0,0),(0,0,1)).
我在pseudoemacs窗口中按下compile Buffer,输出为:
% [PATH].pl compiled 0.00 sec, 136 bytes
ERROR: emacs_prolog_mode ->error_at_location: Argument 1 (int): `int' expected, found `@11470948?start'
ERROR: emacs_prolog_mode ->error_at_location: Argument 1 (int): `int' expected, found `@11470948?start'
Warning: [PATH]s.pl:5:
Goal (directive) failed: user:orthogonal((1,0,0), (0,0,1))
【问题讨论】:
标签: prolog