Re: D6/D7 EVIL BUG: $IFDEF stripped from units in the USES clauses of DPR/DPK source files.

From: Cruxy (cruxyATcruxyDOTnet)
Date: 10/01/03


Date: 30 Sep 2003 23:41:39 -0700


> uses
> {$IFDEF MEMDEBUG}MyHeapUtility{$ENDIF},
> <rest of uses>

This won't work cause if MEMDEBUG is not defined, the uses clause
begins with a ','.
Normally you could do everything with IFDEF as you know from C without
restriction(I work on SW using this since Pascal V?).
AFAIK the parser reduces everything not defined and put in everything
defined - irrelevant if the result is correct or not. And irrelevant if
.dpk, .dpr or .pas.

regards



Relevant Pages

  • Re: Comments on VCL.NET?
    ... Bryce K. Nielsen wrote: ... unit that had an IFDEF section in the Uses clause, ... that were not shared (a Win32 specific file and a .Net specific file, ...
    (borland.public.delphi.non-technical)
  • Re: Comments on VCL.NET?
    ... Bryce K. Nielsen wrote: ... unit that had an IFDEF section in the Uses clause, ... that were not shared (a Win32 specific file and a .Net specific file, ...
    (borland.public.delphi.non-technical)
  • Re: [PATCH] x86: Use v8086_mode helper, trivial unification
    ... Harvey Harrison wrote: ... also ifdef the section for 32-bit only and add to fault_64.c ... gcc will remove the if clause. ...
    (Linux-Kernel)