Author: Pham Minh Tri
Date: 04:08:54 11/05/02
Go up one level in this thread
[snip] > >#if defined (DEBUG) > ... >#endif > [snip] I think use debug like above is very good for portable (I am not pretty sure on that point) but the big disadvantage is you have to use many lines for debugs. On the other hand, if I use asserts, I can write them very fast (few charactors) and they need very tiny places and can be suitable anywhere. In my program, I use mainly asserts, use #if DEBUG only in few places where I need more information/checking. Sometimes, I write some complicated functions just for checking by asserts.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.