Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #35313 > unrolled thread

Re: Multichar tokens

Started byMartin Gregorie <martin@address-in-sig.invalid>
First post2016-08-14 00:39 +0000
Last post2016-08-14 00:39 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.java.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Multichar tokens Martin Gregorie <martin@address-in-sig.invalid> - 2016-08-14 00:39 +0000

#35313 — Re: Multichar tokens

FromMartin Gregorie <martin@address-in-sig.invalid>
Date2016-08-14 00:39 +0000
SubjectRe: Multichar tokens
Message-ID<nooeka$e3o$1@dont-email.me>
On Sat, 13 Aug 2016 22:05:54 +0000, Stefan Ram wrote:

> In Java, »- -2« must be written as »- -2« and not as »--2«,
>   because there also is a special »--« operator. So, when one does want
>   two consecutive unary minus operators, one needs to separate them by
>   white space. This also applies to »+«.
> 
>   There are several other character combinations with special meanings
>   [1].
>
Java syntax isn't all that surprising because ++ and -- are always 
monadic operators while >> and << are dyadic.

Any parser should know the difference between the two and so should not 
get this wrong.

In any case, its quite unusual to see either ++ or -- used inside an 
arithmetic expression. I can't remember ever seeing that construct.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

[toc] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web