Is there a way to turn compiler switch directives to the current default state (instead of just ON or OFF)?

48 Views Asked by At

For Delphi compiler directives, is there a way to turn a switch directive to its "current global default state"?

I have read the documentation page at http://docwiki.embarcadero.com/RADStudio/Sydney/en/Delphi_compiler_directives, but it explains only how to turn switch directives on or off. My code contains several places with this construct (meant to avoid hints for a particular section of code):

{$HINTS OFF}
  // ... some code ...
{$HINTS ON}

However, this turns hints (back) on afterwards, which is not what I want when I do e.g. a release compilation with hints suppressed globally (using for example the -H- option to the dcc32.exe command-line compiler).

I would want something like this:

{$HINTS OFF}
  // ... some code ...
{$HINTS DEFAULT}

Does that exist?

0

There are 0 best solutions below