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).
Run Code Online (Sandbox Code Playgroud)
但是,当我执行以下操作时:
body(Body, Miles, _, _, _,) , Miles > 100.
Run Code Online (Sandbox Code Playgroud)
我收到以下错误,对我来说似乎完全合法:
?- body(Body, Miles, _, _, _,) , Miles > 100.
ERROR: Syntax error: Illegal start of term
ERROR: body(Body, Miles, _, _, _,
ERROR: ** here **
ERROR: ) , Miles > 100 .
?-
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释我错了吗?
非常感谢任何建议,
您的查询中有一个额外的逗号.它应该是
body(Body, Miles, _, _, _), Miles > 100.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4264 次 |
| 最近记录: |