当我想在ECLiPSe-CLP中运行这段代码时,我得到以下错误
Error:
string stream 27: syntax error: postfix/infix operator expected
| 4 $= X^2 + Y^2, (Error Mark is under '=')
| 代码:
circles(X, Y) :-
4 $= X^2 + Y^2,
4 $= (X - 1)^2 + (Y - 1)^2,
X $>= Y.发布于 2019-04-22 02:28:02
$=/2操作符/谓词是一个库谓词。你正在加载定义它的库吗?例如。
[eclipse 12]: lib(ic).
...
Yes (0.12s cpu)
[eclipse 13]: [user].
circles(X, Y) :-
4 $= X^2 + Y^2,
4 $= (X - 1)^2 + (Y - 1)^2,
X $>= Y.
^Dtty compiled 4024 bytes in 0.00 seconds
Yes (0.00s cpu)
[eclipse 14]: circles(X, Y).
X = X{-1.0000000000000004 .. 2.0000000000000004}
Y = Y{-1.0000000000000004 .. 2.0000000000000004}
There are 13 delayed goals. Do you want to see them? (y/n) https://stackoverflow.com/questions/55785207
复制相似问题