7

I have the construct:

{$ifopt FINITEFLOAT ON}
  {$message 'FINITEFLOAT option ON' }
{$else }
  {$message 'FINITEFLOAT option OFF' }
{$endif }

in my source and it won't compile! It's got to be something stupid. The error is:

E1030 Invalid compiler directive: '$IFOPT'

at the first line, but it is the FINITEFLOAT it's complaining about. You don't seem to be able to specify anything except the single letter directives like R+ etc as the argument of IFOPT.

Am I missing something here?

skaffman
  • 398,947
  • 96
  • 818
  • 769
rossmcm
  • 5,493
  • 10
  • 55
  • 118

2 Answers2

5

You are totally correct AFAICT. I don't use $IFOPT often but everytime I do this behaviour annoys me. I have no idea why this is implemented this way.

Edit: There's a Quality Central ticket for this.

Edit: There's a Quality Portal ticket for this.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
Uli Gerhardt
  • 13,748
  • 1
  • 45
  • 83
  • Just found this: "http://docwiki.embarcadero.com/RADStudio/en/X1030_Invalid_compiler_directive_-_'%25s'_(Delphi)" (quoted URL as S/O doesn't parse the URL properly if it ends in a ")"). And I see the QC. Unbelievable. So I can't report the state of a compiler option that doesn't have an abbreviated form? – rossmcm Aug 31 '10 at 21:57
  • Aside. Found my posting in a google search less than 15 minutes after submitting it. Now that's quick. – rossmcm Aug 31 '10 at 21:58
1

True, you cant :( Thats because IFOPT considered as backward compatibility feature and doesnt work with any extended directives. eg: {$A2} can be set, but not retrieved back

Free Consulting
  • 4,300
  • 1
  • 29
  • 50