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 processing at fault #600

Open
flexoron opened this issue Oct 2, 2024 · 4 comments
Open

List processing at fault #600

flexoron opened this issue Oct 2, 2024 · 4 comments

Comments

@flexoron
Copy link

flexoron commented Oct 2, 2024

?- L = ['A','B'('C')],length(L,N).
   L = ['A','B'('C')], N = 2.

?- L = ['A','B' ('C')],length(L,N).
   false.
?- L = ['A','B' ('C')].
   L = ['A','B'|'C']. % unexpected
@infradig
Copy link
Contributor

infradig commented Oct 2, 2024

Interesting...

?- X = [1,f (2),3].
Error: syntax error, operator expected before parens, user:1
?- X = [1,'f' (2),3].
   X = [1,f|2].
?- 

infradig added a commit that referenced this issue Oct 3, 2024
@flexoron flexoron closed this as completed Oct 3, 2024
@flexoron
Copy link
Author

flexoron commented Oct 3, 2024


?- L = ['f' (.)]. % fixed
Error: syntax error, operator expected before parens, user:1

?- L = ['.' (f)]. % foxed
   L = ['.'|f].
?- 

@flexoron flexoron reopened this Oct 3, 2024
infradig added a commit that referenced this issue Oct 3, 2024
@flexoron
Copy link
Author

flexoron commented Oct 3, 2024

v2.56.29
Looks like some operators are involved, too

?- L = [',' (x)].
   L = [','|x].
?- L = ['*->' (x)].
   L = [*->|x].
?- L = ['->' (x)].
   L = [->|x].
?- L = [';' (x)].
   L = [;|x].
?- L = ['^' (x)].
   L = [^|x].

infradig added a commit that referenced this issue Oct 3, 2024
@flexoron
Copy link
Author

flexoron commented Oct 3, 2024

v2.56.30
Now this, again, seems a problem:

?- L = ['.' ('.')].
Error: syntax error, operator expected before parens, user:1
?- L = ['.'('.')].
   L = ['.'('.')].

?- op(1,fy,'.').
   true.
?- L = ['.'('.')].
   L = ['.' ('.')]. % printed but not accepted:
?- L = ['.' ('.')].
Error: syntax error, operator expected before parens, user:1
?- 

infradig added a commit that referenced this issue Oct 3, 2024
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

2 participants