Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ucsd!sdcc6!loral!jlh From: jlh@loral.UUCP (The Mad Merkin Hunter) Newsgroups: comp.lang.c Subject: How do you explain the obvious? Message-ID: <1738@loral.UUCP> Date: 26 Apr 88 20:08:17 GMT Organization: Under the table Lines: 21 Keywords: aaaarrgghhhh! 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