Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.lang.c Subject: Re: When do you use "if ( a = b )"? (was Re: Funny mistake) Message-ID: <11109@dog.ee.lbl.gov> Date: 19 Mar 91 19:13:45 GMT References: <8148@rsiatl.Dixie.Com> <15481@smoke.brl.mil> <775@camco.Celestial.COM> <65837@eerie.acsu.Buffalo.EDU> <1991Mar18.195351.11985@unlv.edu> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 21 X-Local-Date: Tue, 19 Mar 91 11:13:46 PST In article <1991Mar18.195351.11985@unlv.edu> grover@sonny-boy.cs.unlv.edu (Kevin Grover) writes: >There are plenty of uses for it. It will allow smaller code, and checks to be >done quicker. Smaller source code, yes. Smaller or faster object code---well, if your compiler generates different code for if (a = b) than for a = b; if (a) then your compiler is not worth what you paid for it. (Well, with two possible exceptions: if you have turned off all optimization, or if `a' is declared `volatile'.) -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov