From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 22 Jun 93 15:33:02 GMT From: agate!howland.reston.ans.net!math.ohio-state.edu!sdd.hp.com!col.hp.com!cs n!nugget.rmNUG.ORG!nugget.rmNUG.ORG!rlove@ucbvax.Berkeley.EDU Subject: Re: Software vendors not using Ada but C Message-ID: <1993Jun22.153302.5375@nugget.rmNUG.ORG> List-Id: In article <20366@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes: > > > Consider the generic C statement: c=a+++b; . > > This > ambiguous statement can mean four things which are all equally > > admissible as ANSI C: > > This is outrageously false. The ISO standard, section 6, subsection > Semantics, paragraph 2, and example 2 make it crystal clear that > there is precisely one way of dividing this into tokens: > {c} {=} {a} {++} {+} {b} {;} The grammar admits only one > parse, and that parse admits only the interpretation > 3. c = > a + b ; a = a + 1 ; (If c and a are aliases, the construct is > explicitly undefined.) > The original claim startled me into action. I tested this on 3 compilers, 2 for DOS and gcc on Unix. All three got the same results and they matched option 3, that is a + b; a = a + 1; I personally hate C and want all the ammunition against it I can get but false claims such as this don't help. -- Bob Love rlove@raptor.rmnug (NeXT Mail OK) BIX: rlove --------------------------------------------------------------------------