modeswitch
From Free Pascal wiki
Jump to navigationJump to search
As of FPC 2.3.1, the {$MODESWITCH} directive can be used to select some of the features that a {$MODE } directive would select.
It can be used to enable language features that would otherwise not be available in the current mode. For example, you might be programming in TP mode, but want to use the Out parameters, which are only available in Delphi mode.
The {$MODESWITCH } directive enables or disables individual mode features without changing the current compiler mode.
This switch is a global switch, and can be used wherever the {$MODE} switch can be used.
The syntax is as follows:
{$MODESWITCH XXX}
{$MODESWITCH XXX+}
{$MODESWITCH XXX-}
The first two will switch on feature XXX, the last one will switch it off.
The feature XXX can be one of the following:
More detailed information:
- $modeswitch (extern)