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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, LOTS_OF_MONEY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d6ef988ec3a5ef7 X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator Date: 1998/01/22 Message-ID: <199801221427.PAA05971@basement.replay.com>#1/1 X-Deja-AN: 318322744 Content-Transfer-Encoding: 7bit References: Content-Type: text/plain; charset=us-ascii Organization: Replay Associates, L.L.P. Mail-To-News-Contact: postmaster@nym.alias.net X-001: Replay may or may not approve of the content of this posting X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Newsgroups: comp.lang.ada Date: 1998-01-22T00:00:00+00:00 List-Id: <01bd1e34$1632c2c0$24326489@Westley-PC.calspan.com> <34bba5a1.224459@SantaClara01.news.InterNex.Net> On 22 Jan 1998 01:18:36 -0500, dewar@merv.cs.nyu.edu (Robert Dewar) wrote: > > > x & + b asking for comments about the error message that a compiler should put out when it encounters this kind of construct. The writer intended to use unary "+", but forgot to surround "+b" with parentheses. I frequently don't see postings to this newsgroup, or see them out of order. This is the first I've seen of Dewar's request about this. If I'd seen it earlier, I might have replied earlier. "X & + B" might be "X & Y + B", where the writer didn't hit the Y key hard enough and didn't notice it, or it might be "X & (+ B)" without parentheses. If it's the former, the compiler should put out an error message about missing the left operand for binary "+"; if the latter, about needing parentheses for unary "+" in this context. Is it possible for the compiler to tell the difference? In real Ada, we're more likely to see "Xenia & +Bernard" than "X & + B" (spaces significant). It this likely to be a typo for "Xenia & Yakob + Bernard"? I think not. Therefore, I think the error message should generally be about unary "+". Also, unary "+" and "-" generally don't have following spaces (though I've seen pretty-printed code where they did), so the spacing could give a clue as to what was intended. That's my valeur de deux centimes. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "Now go away or I shall taunt you a second time." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/