Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"List as terms" section no longer applicable to SWI Prolog 7 #1

Open
JoergStrebel opened this issue Oct 21, 2016 · 0 comments
Open

Comments

@JoergStrebel
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant