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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ace3fca092a457cd,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s21.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: Unary operator after binary operator: legal or not? 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_s21 1185835946 12.201.97.213 (Mon, 30 Jul 2007 22:52:26 GMT) NNTP-Posting-Date: Mon, 30 Jul 2007 22:52:26 GMT Organization: AT&T ASP.att.net Date: Mon, 30 Jul 2007 22:52:26 GMT Xref: g2news2.google.com comp.lang.ada:1282 Date: 2007-07-30T22:52:26+00:00 List-Id: Here's something confusing I encountered: with Ada.Strings.Unbounded; function Xyz (Left, Right : in Ada.Strings.Unbounded.Unbounded_String) return String is function "+" (Right : in Ada.Strings.Unbounded.Unbounded_String) return String renames Ada.Strings.Unbounded.To_String; begin -- Xyz if +Left <= +Right then return +Left & +Right; -- ^ Error reported here. end if; end Xyz; A compiler reports "missing operand", referencing the space after the "&". Why then does it accept the comparison in the previous line? Both are +Left [binary operator] +Right -- Jeff Carter "Have you gone berserk? Can't you see that that man is a ni?" Blazing Saddles 38