In our previous episode, Graeme Geldenhuys said:
> > Just in case: not Delphi compatible.
> 
> In this case I can't use it, because this project must stay Delphi
> compatible. Still a very useful tip though. Thanks again.

Then you must test with $ifopt, set a define if it is enabled, and then
restore it if the define is set afterwards and undef the define. 

It is more verbose but it works, something like:

{$undef something}
{$ifopt hints } // don't know exact syntax}
  {$define something}
{$endif}
{$hints on}

.... code

{$ifndef something}
  {$hints off}
{$endif}

Problem is that this construct doesn't nest, and gets really complicated for
multiple settings.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to