I am interested in using code that is similar to the following:
?- Expression =.. [+, 2, 3].
Expression = 2+3
(From “The Prolog Dictionary” http://www.cse.unsw.edu.au/~billw/prologdict.html#univ)
In JLog, this code does not work with the + character:
Expression =.. [+, 2, 3].
ubc.cs.JLog.Parser.SyntaxErrorException: Expected ']' at 20 : line,char(1, 20)
However, it works with the * character:
Expression =.. [*, 2, 3].
=..(Expression, [*, 2, 3])
Expression = 2 * 3
The code with the + character also works in SWI-Prolog and JIProlog.
Is the code that uses the + character supposed to work in JLog?
I'm afraid this is a known bug:
Putting operators in parenthesis (e.g., X =.. [(+),2,3].) should work around the issue.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.