Reputation: 999
I was working in Prolog and all of the sudden when I tried to load my source file I started getting this error: uncaught exception: error(syntax_error('user_input:1 (char:5) , | ] or operator expected in list'),read_term/3)
I created an empty source file test.pl and tried loading it as well [test.pl]
. but I receive the same error. How can I fix this?
Upvotes: 0
Views: 1556
Reputation: 18663
If you typed exactly [test.pl]
as you wrote in your question, then the error is due to not using an atom as the argument to the list notation shortcut to compile and load files. Try instead ['test.pl']
or simply [test]
.
Upvotes: 2