From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ace3fca092a457cd X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Unary operator after binary operator: legal or not? => Compiler Error Date: Tue, 31 Jul 2007 16:59:48 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1185901323.18398.4.camel@kartoffel> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1185915588 20370 192.74.137.71 (31 Jul 2007 20:59:48 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 31 Jul 2007 20:59:48 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:W0jLQjcTjBNDRuYwN5ZtXdbZyp4= Xref: g2news2.google.com comp.lang.ada:1299 Date: 2007-07-31T16:59:48-04:00 List-Id: Georg Bauhaus writes: > On Tue, 2007-07-31 at 11:53 -0400, Robert A Duff wrote: > >> But don't you think: >> >> X * -3 >> >> ought to be legal (no user-defined operators in sight)? > > You'r kidding, aren't you? I wasn't... >...Next thing would be > > X *- 3; OK, you make a good point. But what's the general principle? Can't write two operators in a row? Then why is "X=-3" legal? (Of course I would normally write "X = -3".) And why does -11 mod 5 = -1? > Or, can't we have X + -3, please? > > Why is --3 not positive? I get a strange compiler error. ;-) - Bob