$O

From Free Pascal wiki
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}