2011-08-30 46 views
0

GNU Emacs 23.2.1 prolog-mode-version是一個在`prolog.el'中定義的變量。其值爲「1.22」非法開始的期限

我已經諮詢了以下文件:

body(mercury, 36, small, none, none). 
body(venus, 67, small, atmosphere, none). 
body(earth, 93, small, atmosphere, none). 
body(moon, 93, small, none, none). 
body(mars, 141, small, atmosphere, none). 
body(jupiter, 489, large, atmosphere, rings). 

然而,當我做到以下幾點:

body(Body, Miles, _, _, _,) , Miles > 100. 

我碰到下面的錯誤,似乎完全合法的我:

?- body(Body, Miles, _, _, _,) , Miles > 100. 
ERROR: Syntax error: Illegal start of term 
ERROR: body(Body, Miles, _, _, _, 
ERROR: ** here ** 
ERROR:) , Miles > 100 . 
?- 

任何人都可以解釋我錯了嗎?

非常感謝您的任何建議,

回答

5

您在查詢中有一個額外的逗號。 它應該是

body(Body, Miles, _, _, _), Miles > 100. 
+0

謝謝,不知道我怎麼錯過了。 – ant2009