joejared@webworldinc.com wrote:
> {$DEFINE DEBUG}
>
> {$IFDEF DEBUG}
jo> why not use {$ifopt d+}
That would be okay if I only wanted to toggle one compiler directive,
but normally I use the DEBUG conditional for more than just that. I
usually add debugging code somewhere in the source and wrap it with a
{$IFDEF DEBUG} ... {$ENDIF} so that it'll automatically be compiled in
if I'm debugging. Using a conditional this way also allows me to more
easily isolate the inclusion of debugging code to selected units by
doing a search/replace of DEBUG to something like DEBUG_XYZ, so only
the DEBUG_XYZ conditional will be toggled on, rather than every unit
that uses the DEBUG conditional.
Kim Forwood
---------------------------------------
Internet: kim.forwood@elab.canbbs.net
FidoNet: Kim Forwood, 1:153/831
---------------------------------------
--- Blue Wave/DOS v?.??
---------------
* Origin: The Eclectic Lab (1:153/831)
|