开发者

illegal start of term

开发者 https://www.devze.com 2023-03-31 15:06 出处:网络
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:

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.
0

精彩评论

暂无评论...
验证码 换一张
取 消