[fpc-devel] Macro Processing
Florian Klämpfl
florian at freepascal.org
Fri May 13 20:29:32 CEST 2011
Am 13.05.2011 17:41, schrieb Martin:
> On 13/05/2011 15:19, Hans-Peter Diettrich wrote:
>>
>> Replacement of $IFs. (Around DebugLn...)
>
> That one is solved already, with existing macros.
> rtl\inc\lnfodwrf.pp
>
>
>
> {$MACRO ON}
> //{$DEFINE DEBUG_DWARF_PARSER}
> {$ifdef DEBUG_DWARF_PARSER}
> {$define DEBUG_WRITELN := WriteLn}
> {$else}
> {$define DEBUG_WRITELN := //}
> {$endif}
>
>
> and then
> DEBUG_WRITELN('Skipping directory : ', s);
Or just use an inline function with ifdef as mentioned previously. An
inline function with an empty procedure body shouldn't cause any
additional code.
More information about the fpc-devel
mailing list