eric@snark.UUCP (Eric S. Raymond) (12/22/88)
> 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