Xref: utzoo comp.misc:5393 comp.lang.misc:2713 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!oliveb!apple!voder!pyramid!prls!philabs!ttidca!hollombe From: hollombe@ttidca.TTI.COM (The Polymath) Newsgroups: comp.misc,comp.lang.misc Subject: Re: Program Errors and developement environment Message-ID: <3998@ttidca.TTI.COM> Date: 6 Mar 89 20:34:05 GMT References: <4352@enea.se> <2950@hound.UUCP> Reply-To: hollombe@ttidcb.tti.com (The Polymath) Organization: The Cat Factory Lines: 42 In article <2950@hound.UUCP> elliott@hound.UUCP (E.GORELICK) writes: }This has happened more than once and the program will often compile }and run especially if it is an error trapping routine. } }17) Did you comment out part of your code? } }You feel really stupid when you find the error. This is the reason I delimit all comments line by line and have fought to get that practice included in several coding standards. C example: /* This comment is */ /* delimited line */ /* by line. */ /* This is the way too many other people do it. */ The above example is a trivial oversimplification that doesn't show how the second form can cause problems. I've seen several pages of comments, including some that looked remarkably like source code, delimited with a single set of /* */. Also, when deliberately commenting out source code, if you do it line by line, it makes it much easier to find when scanning through the code and makes it less easy to forget or not notice that it's been commented out. (A better technique for this is to use #ifdef BLAH #endif, where BLAH is not defined. #ifdef BLAH is harder to miss than /*). I've never accidentally commented out source code since following this practice. (I've never done it anyway, but better safe than sorry). -- The Polymath (aka: Jerry Hollombe, hollombe@ttidca.tti.com) Illegitimati Nil Citicorp(+)TTI Carborundum 3100 Ocean Park Blvd. (213) 452-9191, x2483 Santa Monica, CA 90405 {csun|philabs|psivax}!ttidca!hollombe