[lazarus] Win32 Installer/Lazarus

Michael A. Hess mhess at miraclec.com
Wed Jul 21 08:18:53 EDT 1999


Michael Van Canneyt wrote:
> 
> Exact. But I am not sure whether the parser supports
> {$DEFINE DEBUG:=//}
> the // comment may confuse it. Has this been tested ?

It works like a charm here is how I set it up.

program test;

{$define DEBUGOUT:=//}

begin
   writeln('first line');
   DEBUGOUT ('*** debug line ***');
   writeln('last line');
end.

When done this way I only get the 2 writeln statements. When I changed
it to this.

program test;

{$define DEBUGOUT:=writeln}

begin
   writeln('first line');
   DEBUGOUT ('*** debug line ***');
   writeln('last line');
end.

I get all 3 lines. Works cool.

I had hoped I could do something like this.

{$define //DEBUGOUT:=writeln}

begin
.
.
   //DEBUGOUT ('debug text');
.
.
end.

This way if the macro wasn't defined or if -Sm was set it would just
take the line as a comment. Infortunately it doesn't appear that the
define statement can handle a macro named with leading '//' characters.

Hey compiler guys any chance that this is changable? That would make the
code really slick if it could be self commenting lines.

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list