I have run into an apparently unlogical priority for the "div" operation: "X div Y + Z" is evaluated as "X div (Y+Z)" in the scala wrapper for JaCoP. I had to write it "(X div Y) + Z" to get the expected result. Is this behaviour normal?
Yes, I know this but I do not know how to define priorities for overloaded operators in Scala. I think, it is not possible in the same way as it is possible in Prolog, for example. You need to use parenthesis. Sorry.
Please, let me know if you will find a way to do it ;)
The other explanation is the way Scala interprets space in the statement "X div Y + Z". It is, in fact, another way of writing "X.div(Y.+(Z))" and this probably explains everything.
Yes, it is indeed a good and simple explanation. :-) Thanks.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.