[fpc-pascal] Compiler Mode?

Michael Van Canneyt michael at freepascal.org
Wed Feb 24 12:57:14 CET 2016



On Wed, 24 Feb 2016, Anthony Walter wrote:

> On another forum a Free Pascal user opined that {$MODE DELPHI} is wrong and
> should not be used other than for people or companies trying to convert
> Delphi code to Free Pascal.
>
> What's the official position on this point?

People are free to use whatever mode suits them best.

But {$Mode delphi} is intended to make the compiler behave as much as
possible as the Delphi compiler, and thus should be most suitable for
companies trying to convert Delphi code to Free Pascal.

We think {$Mode objpas} is the better mode, but this is just our private
opinion.

Note that the mode switch says only something about the available Object 
Pascal language constructs when compiling code.

It also doesn't say anything about behaviour of other units in your current
code. In particular: It doesn't say anything about the available identifiers 
in units that are available both in Delphi and FPC. (sysutils, classes, db).

Michael.



More information about the fpc-pascal mailing list