Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site harvard.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!harvard!stew From: stew@harvard.ARPA (Stew Rubenstein) Newsgroups: net.lang.c Subject: Re: C question Message-ID: <26@harvard.ARPA> Date: Wed, 10-Apr-85 02:21:10 EST Article-I.D.: harvard.26 Posted: Wed Apr 10 02:21:10 1985 Date-Received: Fri, 12-Apr-85 05:30:23 EST References: <5272@tektronix.UUCP> <230@aluxp.UUCP> <288@bdaemon.UUCP> Organization: Aiken Computation Laboratory, Harvard Lines: 14 Regarding the question about x = x++ and a[i] = i++ and similarly ambiguous constructs: Why the (*@#$%^*^ can't the compiler complain rather than flipping a coin? Programs with statements like these are WRONG, just as wrong as one with a missing brace. And while I am making suggestions to the compiler-writers out there, I'd like to endorse the action of the compiler which warned the programmer of a possibly unintended assignment in the statement "if (i = 0) ..." I have spent too much time fixing bugs caused by this. I have even written "i == j;", also a legal statement, but one which I would love to have had the compiler complain about. -- ----------------------- Stew Rubenstein UUCP: ihnp4!harvard!stew Harvard Chemistry ARPA: stew@harvard