$O

From Free Pascal wiki
Revision as of 12:18, 6 March 2020 by Trev (talk | contribs) (English translation of German page with extra info from FPC manual)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Deutsch (de) English (en)


Back to global compiler directives.


Since Free Pascal v2.0.0, the global compiler directive $O has the same meaning as the local compiler directive $OPTIMIZATION switching on/off level two optimizations.

$O uses the + and - switches.

$OPTIMIZATION uses the ON and OFF switches.

Example:

  // Enable global level 2 optimization
  {$O+}

  // Enable local level 2 optimization
  {$OPTIMIZATION ON}