Skip to content

Forms like (*) or (','), is that intended in Scryer? #2145

Closed Answered by UWN
haijinSk asked this question in Q&A
Discussion options

You must be logged in to vote

A term like X = ','. is invalid syntax, because the comma is an operator. Try to enter it at the top level. An atom that is an operator cannot be the argument of another operator. Therefore the round brackets. (Of course, some Prologs are more permissive, but they often interpret invalid syntax differently).

Note, however, that the round brackets are only needed when an atom which is also an operator is an operand of some operator. In other situations, the round brackets are not needed like in the term f(*,[*,*|*],{*},*).

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@haijinSk
Comment options

Answer selected by haijinSk
Comment options

You must be logged in to vote
1 reply
@UWN
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants