Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utcs!mnetor!seismo!lll-crg!lll-lcc!pyramid!decwrl!sun!guy From: guy@sun.UUCP Newsgroups: net.lang.c Subject: Re: Re: Re: Precedent for use of = Message-ID: <5057@sun.uucp> Date: Sat, 12-Jul-86 15:50:14 EDT Article-I.D.: sun.5057 Posted: Sat Jul 12 15:50:14 1986 Date-Received: Sun, 13-Jul-86 05:40:50 EDT References: <2323@umcp-cs.UUCP> <514@cbmvax.cbmvax.cbm.UUCP> Organization: Sun Microsystems, Inc. Lines: 23 > Hey, you can use assignment in C as if it were a statement only when you > write YOUR C code, but in the example that you give its used in its full > power as an operator, which can generate much more efficient code than > the equivalent: > > a=b > if (b) If your compiler can't generate equally efficient code for a = b; if (a != 0) and if ((a = b) != 0) on any machine other than an incredibly weird one, then your compiler needs to be improved. -- Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com (or guy@sun.arpa)