illegal start of term
GNU Emacs 23.2.1 prolog-mode-version is a variable defined in `prolog.el'. Its value is "1.22"
I have consulted the following file:
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).
However, when I do the following:
body(Body, Miles, _, _, _,) , Miles > 100.
I get the following error, it seems perfectly legal to me:
?- body(Body, Miles, _, _, _,) , Miles > 100.
ERROR: Syntax error: Illegal start of term
ERROR: body(Body, Miles, _, _, _,
ERROR: ** here **
ERROR: ) , Miles > 100 . 开发者_开发知识库
?-
Can anyone explain I am going wrong?
Many thanks for any advice,
You have an extra comma in your query. It should be
body(Body, Miles, _, _, _), Miles > 100.
精彩评论