prolog 中出现太多参数错误
customer(chuchi, goyal, 800.00).
customer(rishu, jain, 900.00).
get_cust_bal(X, Y, Z):-
customer(chuchi, Y, 800.00),
customer(X, Y, Z),
format('owes me Bal ~w', [X, Y, Z]).
错误是
Format error: too many arguments
ERROR: In:
ERROR: [11] format('owes me Bal ~w',[_4304,goyal|...])
ERROR: [9] toplevel_call(user:user: ...) at c:/program files/swipl/boot/toplevel.pl:1162
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
customer(chuchi, goyal, 800.00).
customer(rishu, jain, 900.00).
get_cust_bal(X, Y, Z):-
customer(chuchi, Y, 800.00),
customer(X, Y, Z),
format('owes me Bal ~w', [X, Y, Z]).
the error is
Format error: too many arguments
ERROR: In:
ERROR: [11] format('owes me Bal ~w',[_4304,goyal|...])
ERROR: [9] toplevel_call(user:user: ...) at c:/program files/swipl/boot/toplevel.pl:1162
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论