clpfd top level infix query yields an error:
Closed this issue · 2 comments
I got those errors when trying clpfd queries with ediprolog.
% ?- X #= 3.
%@ ERROR: Syntax error: Operator expected
%@ ERROR: X
%@ ERROR: ** here **
%@ ERROR: #= 3 .
the same occurs with: % ?- X in 0..3.
regular arithmetic operators works well:
% ?- X = 3.
%@ X = 3.
any ideas ?
ps: ediprolog is really handy, thank you a lot !
With Scryer Prolog and its library(clpz)
, I get:
%?- use_module(library(clpz)). %@ true. %?- X #= 3. %@ X = 3.
You can see the full interaction in the buffer *ediprolog-history*
in order to reproduce any issue directly on the Prolog toplevel.
(=)/2
denotes syntactic unification, and is not limited to arithmetic. For example:
%?- X = a+b. %@ X = a+b.
Thank you for your kind words, I'm very glad you find ediprolog useful! Enjoy!
Thank you for the quick answer, the problem is indeed related to my code, it occurs only in a particular context, I should have tried to minimize it before posting it as an issue ! Sorry for that :)