delphiconditional-compilation

Delphi - How to use more defined values in conditional compilation


Can I combine some IFDEFS in my source?

For example:

{$IFDEF INCOMING or OUTGOING}
...
{$ENDIF}

Solution

  • Use $IF with Defined() rather than $IFDEF:

    {$IF Defined(INCOMING) or Defined(OUTGOING)}
    ...
    {$IFEND}