Difference between revisions of "Compiler Mode"
From Lazarus wiki
Jump to navigationJump to search (link) |
(external link to command line options) |
||
Line 1: | Line 1: | ||
{{Compiler Mode}} | {{Compiler Mode}} | ||
− | The Free Pascal compiler will compile in a specific ''mode''. Each mode dictates what syntax the compiler accepts as valid, and what it considers as invalid. The compiler mode can be set in the source code with the {$mode } [http://freepascal.org/docs-html/current/prog/progch1.html#x5-40001 compiler directive], or on the command line with the -M option. | + | The Free Pascal compiler will compile in a specific ''mode''. Each mode dictates what syntax the compiler accepts as valid, and what it considers as invalid. The ''compiler mode'' can be set in the source code with the {$mode } [http://freepascal.org/docs-html/current/prog/progch1.html#x5-40001 compiler directive], or on the command line with the -M [http://www.freepascal.org/docs-html/user/userap1.html command line option]. |
*Free Pascal: {$mode '''FPC'''}<br/>This is the original Free Pascal compiler mode. As of version 3, It is the ''default mode'' of the compiler, so it is not necessary to explicitly add this directive. | *Free Pascal: {$mode '''FPC'''}<br/>This is the original Free Pascal compiler mode. As of version 3, It is the ''default mode'' of the compiler, so it is not necessary to explicitly add this directive. | ||
− | *Extended Free Pascal: {$mode '''OBJFPC'''} <br/>This mode adds extra functionality to the FPC mode, including [[Class | classes]], [[Interface|interfaces]] and [[language/features/exception handling|exceptions]]. | + | *Extended Free Pascal: {$mode '''OBJFPC'''} <br/>This mode adds extra functionality to the '''FPC''' mode, including [[Class | classes]], [[Interface|interfaces]] and [[language/features/exception handling|exceptions]]. |
*Turbo Pascal: {$mode '''TP'''} <br/>This is the [[Turbo Pascal]] compatibility mode. | *Turbo Pascal: {$mode '''TP'''} <br/>This is the [[Turbo Pascal]] compatibility mode. |
Revision as of 05:25, 7 July 2016
│
Deutsch (de) │
English (en) │
español (es) │
suomi (fi) │
français (fr) │
The Free Pascal compiler will compile in a specific mode. Each mode dictates what syntax the compiler accepts as valid, and what it considers as invalid. The compiler mode can be set in the source code with the {$mode } compiler directive, or on the command line with the -M command line option.
- Free Pascal: {$mode FPC}
This is the original Free Pascal compiler mode. As of version 3, It is the default mode of the compiler, so it is not necessary to explicitly add this directive.
- Extended Free Pascal: {$mode OBJFPC}
This mode adds extra functionality to the FPC mode, including classes, interfaces and exceptions.
- Turbo Pascal: {$mode TP}
This is the Turbo Pascal compatibility mode.
- Delphi: {$mode DELPHI}
This is the Delphi compatibility mode.
- Mac Pascal: {$mode MacPAS}
The Mac Pascal compatibility mode.