The {$MODE} sets the compatibility mode of the compiler. This is equivalent to setting one of the
command line options -So, -Sd, -Sp or -S2. it has the following arguments:
-
Default
- Default mode. This reverts back to the mode that was set on the command line.
-
Delphi
- Delphi compatibility mode. All object-pascal extensions are enabled. This is the
same as the command line option -Sd. Note that this also implies {$H ON} (i.e., in
Delphi mode, ansistrings are the default).
-
TP
- Turbo pascal compatibility mode. Object pascal extensions are disabled, except
ansistrings, which remain valid. This is the same as the command line option -So.
-
FPC
- FPC mode. This is the default, if no command line switch is supplied.
-
OBJFPC
- Object pascal mode. This is the same as the -S2 command line option.
-
MACPAS
- MACPAS mode. In this mode, the compiler tries to be more compatible to
commonly used pascal dialects on the Mac OS, such as Think Pascal, Metrowerks
Pascal, MPW Pascal.
For an exact description of each of these modes, see appendix D, on page 697.