Xref: utzoo comp.unix.wizards:13635 comp.lang.c:15003 Path: utzoo!attcan!uunet!husc6!rutgers!psuvax1!vu-vlsi!snark!eric From: eric@snark.UUCP (Eric S. Raymond) Newsgroups: comp.unix.wizards,comp.lang.c Subject: Whitespace is your friend Message-ID: Date: 22 Dec 88 03:17:54 GMT References: <9076@smoke.brl.mil> <14020049@hpisod2.hp.com> <212@unix386.convergent.com> <2151@uokmax.uucp> <2155@uokmax.uucp> Sender: eric@snark.UUCP (Eric S. Raymond) Followup-To: comp.lang.c Organization: Cosmic Karmic Recycling Central Lines: 30 Back-References: <8556@alice.uucp> <4421@xenna.encore.com> > Finally, I question why this business of checking for old-fashioned > assignment operators is still in Unix C compilers. After all, V7 came > out around 10 years ago! Does anyone really have around any code that hasn't > been converted to the new syntax by *now*? Heh-heh-heh. Naive, ain't he? I ran across a related gotcha in some old comp.sources.unix code recently. I got a bunch of "warning: old-style assignment" messages. I sicced my trusty gnumacs on 'em with a C-X C-`, only to find myself looking at several instances of card=NOVALUE; "What", I said, "does it all mean?" Not being entirely thick between the ears, I looked up at the head of the file. I found #define NOVALUE -1 and mentally consigned the hapless geek who'd originated the program to an eternal hell of three-piece-suits and COBOL coding until I looked at the rest of it and realized I was ranking on some student's proud first project. He did OK otherwise; it worked and I still run it occasionally. As it turns out, the least intrusive fix was to change the #define to (-1). But the real moral of this story, gentlebeings, is: Whitespace Is Your Friend. When in doubt, use some! -- Eric S. Raymond (the mad mastermind of TMN-Netnews) Email: eric@snark.uu.net CompuServe: [72037,2306] Post: 22 S. Warren Avenue, Malvern, PA 19355 Phone: (215)-296-5718