Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!archone!byron From: byron@archone.tamu.edu (Byron Rakitzis) Newsgroups: comp.lang.c Subject: Re: One more point regarding = and == (more flamage) Message-ID: <13628@helios.TAMU.EDU> Date: 22 Mar 91 14:49:37 GMT References: <13603@helios.TAMU.EDU> <3182@inews.intel.com> Sender: usenet@helios.TAMU.EDU Organization: College of Architecture, Texas A&M University. Lines: 31 In article <3182@inews.intel.com> bhoughto@pima.intel.com (Blair P. Houghton) writes: -In article <13603@helios.TAMU.EDU> byron@archone.tamu.edu (Byron Rakitzis) writes: ->the first instance is rendered UNAMBIGUOUS by the addition: ->b) while ((*foo++ = *bar++) != 0) - -Or by the additions: - - /* mommy: please hold my hand */ - while ((*foo++ = *bar++) != 0) - -Basically, if you're worth the meager pittance they direct-deposit -into your debt with the Company Store, the comments will have -existed long before you wrote the code. Put those in, and make -them accurate, and it doesn't matter how much the code obfuscates. - -It's called top-down design, and involves _thinking_ before -you start making mistakes. - Using comments to explain away obfuscation when a simple alternative is possible is *very* poor practise, in my view. How about: i++; and /* increment the value of i, when i is nonzero (but if you look at the code 2 lines above, you'll see that i is never zero at this point) */ i -=- i/i;