Sign in Join
Wiki copytemporary

Revision 1 of 1, by Trev on 3-6-2020. The page as it is now.

$O

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:

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

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

From the Free Pascal wiki, page "$O", as it stood on 2020-03-06 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.