[fpc-pascal] Using constants instead of comments

wkitty42 at windstream.net wkitty42 at windstream.net
Wed Apr 18 14:06:40 CEST 2018


On 04/17/2018 11:06 PM, James Richters wrote:
> I have a whole section of diagnostic writeln's in a program, and it's tedious to comment them all out/in as needed.   I'm curious if doing something like


what's wrong with traditional IFDEF?? use something like this...

{$IFDEF DEBUG}
writeln ('blahblahblah');
writeln (LOGFILE,'blahblahblah');
flush (LOGFILE);
{$ENDIF}


then you simply create the DEBUG define...

-DDEBUG

if you don't want it, leave it out and none of the bracketd code is even included...


-- 
  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list unless*
        *a signed and pre-paid contract is in effect with us.*


More information about the fpc-pascal mailing list