How do you explain the obvious?
The Mad Merkin Hunter
jlh at loral.UUCP
Wed Apr 27 06:08:17 AEST 1988
I seem to have inherited a program that is, ahem, not in good shape.
For example, there was a '#define OK 0' at the top of the code, and
some of the routines actually used it. BUT, in addition to OK, it used 0,
FALSE, and NULL used interchangeably! I couldn't believe it!
I mentioned that this was not a good thing to do and the response was "Why
not? I know it's 0 because I set it to 0!". I'm stumped. To me the
answer is so obvious I can't think of anything better than "because".
So what do I tell this person? Oh yeah, the rest of the program. Well,
it took 2 weeks to convert it from microcrap C 4.0 to 5.0. Lots of little
things, like version 4.0 evidently returns 0 (or NULL or FALSE or OK or
whatever) when the function didn't have an explicit 'return(0)' at the
bottom, but 5.0 correctly returns random numbers. Is hari-kari still
honorable?
Jim
--
Jim Harkins
Loral Instrumentation, San Diego
{ucbvax, ittvax!dcdwest, akgua, decvax, ihnp4}!ucsd!sdcc6!loral!jlh
More information about the Comp.lang.c
mailing list