You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn Prolog now 9.2 introduces the list constructors . and [] and gives some example code : ?- .(a,[]) == [a]. yes
In SWI Prolog 7, this example gives the error
ERROR: Stream user_input:25:1 Syntax error: Unexpected end of clause
After googling, I found the reason: http://www.complang.tuwien.ac.at/ulrich/iso-prolog/SWI7_and_ISO. SWI7 deviates from the Prolog standard a bit as it seems. The workaround in SWI 7 is using [|], such as: ?- [a|[]]==[a].
(please see SWI documentation). Maybe you should add an explanatory message to the LPN mentioned above.
The text was updated successfully, but these errors were encountered:
Learn Prolog now 9.2 introduces the list constructors . and [] and gives some example code :
?- .(a,[]) == [a]. yes
In SWI Prolog 7, this example gives the error
After googling, I found the reason: http://www.complang.tuwien.ac.at/ulrich/iso-prolog/SWI7_and_ISO. SWI7 deviates from the Prolog standard a bit as it seems. The workaround in SWI 7 is using [|], such as:
?- [a|[]]==[a].
(please see SWI documentation). Maybe you should add an explanatory message to the LPN mentioned above.
The text was updated successfully, but these errors were encountered: