Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!sun-barr!newstop!exodus!appserv!sun!amdcad!dgcad!dg-rtp!gamecock!hagins From: hagins@gamecock.rtp.dg.com (Jody Hagins) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <1991Mar27.202252.22632@dg-rtp.dg.com> Date: 27 Mar 91 20:22:52 GMT References: <13603@helios.TAMU.EDU> <1991Mar22.161333.24290@dg-rtp.dg.com> <15563@smoke.brl.mil> <357@smds.UUCP> Sender: usenet@dg-rtp.dg.com (Usenet Administration) Reply-To: hagins@gamecock.rtp.dg.com (Jody Hagins) Organization: Data General Corporation, Research Triangle Park, NC Lines: 20 The discussion does not focus on whether or not you should always test against 0, but that you SHOULD always include an explicit test if using assignments. This removes all ambiguity in the conditional test. That way, you ALWAYS know that the programmer didn't put '=' when (s)he meant '==' -- Jody Hagins hagins@gamecock.rtp.dg.com Data General Corp. 62 Alexander Dr. RTP, N.C. 27709 (919) 248-6035 Nothing I ever say reflects the opinions of DGC.