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!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Unary operator after binary operator: legal or not? References: <1185841331.637593.83960@x40g2000prg.googlegroups.com> In-Reply-To: <1185841331.637593.83960@x40g2000prg.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1185918743 12.201.97.213 (Tue, 31 Jul 2007 21:52:23 GMT) NNTP-Posting-Date: Tue, 31 Jul 2007 21:52:23 GMT Organization: AT&T ASP.att.net Date: Tue, 31 Jul 2007 21:52:24 GMT Xref: g2news2.google.com comp.lang.ada:1300 Date: 2007-07-31T21:52:24+00:00 List-Id: Adam Beneschan wrote: > > I think that was a deliberate decision. See the BNF in 4.4. The > operands of "and", "and then", "or", "or else", "xor", "in", or > relational operators are . The definition of a > is > > [unary_adding_operator] term {binary_adding_operator term} > > A unary_adding_operator is part of the syntax of > but not of , so the consequences is that the right operator of a > binary_adding_operator (or a multiplying_operator, or "**" or "abs" or > "not") can't start with a unary adding operator, unless you > parenthesize it. But the right operand of a relational operator or > one of the logical operators I listed above *can* start with a unary > adding operator. I missed that. I knew logical and relational operators were separated from other binary operators to get reasonable precedence behavior, but didn't remember they had special syntax rules to allow this. And "abs" and "not" ARE permitted after binary adding and multiplying operators, further confusing the issue. I'd think being consistent would be be preferable. -- Jeff Carter "All citizens will be required to change their underwear every half hour. Underwear will be worn on the outside, so we can check." Bananas 29