Path: chuka.playstation.co.uk!news From: James Shaughnessy Newsgroups: scee.yaroze.beginners Subject: Re: Debugging code Date: Wed, 23 Sep 1998 13:38:17 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 21 Message-ID: <3608EBB9.6ED2@manc.u-net.com> References: <36060A0C.97E@dma-design.com> <36061BEA.536E8D68@scee.sony.co.uk> <3606303C.869@dma-design.com> <3606A600.C79FE1FE@shell.jps.net> <36075F71.B9689F1F@scee.sony.co.uk> Reply-To: james@manc.u-net.com NNTP-Posting-Host: manc.u-net.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) James Russell wrote: > If "DEBUG" is not defined, that line isn't even included in the > compile. The reason I do this is that it stops my code getting Cool method -- I'm definitely going to use that. It's a lot like _ASSERTtions, which are also *extrememly* useful (because they tell you the file and line number exactly where the assertion failed), and more flexible, assertions being only boolean. The same technique can be used in any way you want specific to your game of course, it being not just limited to printf's. Nice one James, I was getting quite riled looking at all those #ifdef DEBUG #else's in my code! Cheers, Jim -- ----------------------------------------- James Shaughnessy james@manc.u-net.com http://www.netyaroze-europe.com/~shaughnj -----------------------------------------