Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site mplvax.UUCP Path: utzoo!linus!decvax!ittatc!dcdwest!sdcsvax!sdcc3!mplvax!cdl From: cdl@mplvax.UUCP (Carl Lowenstein) Newsgroups: net.lang.c Subject: Re: C style Message-ID: <230@mplvax.UUCP> Date: Thu, 31-Oct-85 23:32:06 EST Article-I.D.: mplvax.230 Posted: Thu Oct 31 23:32:06 1985 Date-Received: Sun, 3-Nov-85 12:49:06 EST References: <1556@brl-tgr> <2600023@ccvaxa> <259@3comvax.UUCP> <538@ttrdc.UUCP> Reply-To: cdl@mplvax.UUCP (Carl Lowenstein) Organization: Marine Physical Laborator of SIO at UCSD Lines: 18 In article <538@ttrdc.UUCP> levy@ttrdc.UUCP (Daniel R. Levy) writes: >In article <259@3comvax.UUCP>, mikes@3comvax.UUCP (Mike Shannon) writes: >>Sorry Scott, I don't buy it. Your example isn't good enough: >functions may be interdependent, share variables, etc, and the order of eval- >uation may be important, or maybe the first checks are very quick and the >latter ones are slow, making the order important to performance optimization >if it is likely that one of the quick checks would fail. The && operator >doesn't GUARANTEE the chronological order of evaluation is going to be left >to right, if you have a screwball compiler (though it most probably will be). Kernighan & Ritchie, The C Programming Language, p. 190: "Unlike &, && guarantees left-to-right evaluation; moreover the second operand is not evaluated if the first operand is 0." -- carl lowenstein marine physical lab u.c. san diego {ihnp4|decvax|akgua|dcdwest|ucbvax} !sdcsvax!mplvax!cdl