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

Cannot use alternative vertical bar or logical negation sign #1591

Closed
Jean-Luc-Picard-2021 opened this issue Aug 23, 2022 · 1 comment
Closed

Comments

@Jean-Luc-Picard-2021
Copy link

I get this in Scryer Prolog:

$ target/release/scryer-prolog -v
"v0.9.0-181-g8e9302ea"
$ target/release/scryer-prolog
?- X = "foo¦bar".
   error(syntax_error(missing_quote),read_term/3:0).
?- [user].
:- op(1100,xfy,¦).
   error(syntax_error(unexpected_char),read_term/3:1).
?-

Whereas in SWI-Prolog I can easily do:

?- X = "foo¦bar".
X = "foo¦bar".

?- [user].
:- op(1100,xfy,¦).
true.

?- X = (foo¦bar), write_canonical(X), nl.
¦(foo,bar)
X = (foo¦bar).
@Jean-Luc-Picard-2021 Jean-Luc-Picard-2021 changed the title Cannot use alternative vertical bar Cannot use alternative vertical bar or logical negation sign Aug 23, 2022
@UWN
Copy link

UWN commented Mar 27, 2023

@mthom ,this seems to be closable. I like the more restricted form as it is now:

?- X = "foo¦bar".
   X = "foo¦bar".
?- op(1100,xfy,¦).
   error(syntax_error(unexpected_char),read_term/3:0) % nice
|   syntax_error(_).   % any syntax error will do
?- op(1100,xfy,'¦').
   true.
?- X=1¦2.
   error(syntax_error(unexpected_char),read_term/3:0) % nice
|  syntax_error(_).   % any syntax error will do
?- X=(1'¦'2).
   X = (1'¦'2).

@mthom mthom closed this as completed Mar 27, 2023
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

3 participants