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


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

Re: Multichar tokens

Path csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From Martin Gregorie <martin@address-in-sig.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Multichar tokens
Date Sun, 14 Aug 2016 00:39:38 -0000 (UTC)
Organization A noiseless patient Spider
Lines 24
Message-ID <nooeka$e3o$1@dont-email.me> (permalink)
References <tokens-20160813225403@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
Injection-Date Sun, 14 Aug 2016 00:39:38 -0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="14456"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+N/Hq8y9NAau1cRMigkGMSKnO7wn6R3f8="
User-Agent Pan/0.140 (Chocolate Salty Balls; GIT 3663720 git://git.gnome.org/pan2)
Cancel-Lock sha1:gqpNMRwc7RT6TOFgEDiu/QeQdw4=
Xref csiph.com comp.lang.java.programmer:35313

Show key headers only | View raw


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       |

Back to comp.lang.java.programmer | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web