Re: (Un)expected syntax error
Carlo Capelli <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CABty9wwyYXqzkE2NdyRWhM432Xr0gEaCHDgXCX_d2yDzweLG7Q@mail.gmail.com> |
As volatile is an operator with precedence higher than comma, I think the
behaviour is correct.
11 ?- current_op(X,Y,volatile).
X = 1150,
Y = fx.
12 ?- writeln((volatile):a).
(volatile):a
true.
13 ?- writeln('volatile:a').
volatile:a
true.
but then I'm in dubt about the disjunction operator. Why it's accepted ?
2013/7/30 Abramo Bagnara <[email protected]>
>
> Is the following behavior expected?
>
> ?- writeln('volatile').
> volatile
> true.
>
> ?- writeln('volatile' : a).
> ERROR: Syntax error: Operator expected
> ERROR: writeln('volatile' :
> ERROR: ** here **
> ERROR: a) .
> ?- writeln(('volatile' : a)).
> ERROR: Syntax error: Operator expected
> ERROR: writeln(('volatile' :
> ERROR: ** here **
> ERROR: a)) .
>
> --
> Abramo Bagnara
>
> BUGSENG srl - http://bugseng.com
> mailto:[email protected]
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
-------------- next part --------------
HTML attachment scrubbed and removed