At the level of language compatibility, FPC is very compatible with Delphi: it can compile
most of FreeCLX, the free Widget library that was shipped with Delphi 6, Delphi 7 and
Currently, the only missing language constructs are:
- Dynamic methods are actually the same as virtual.
- Const for a parameter to a procedure does not necessarily mean that the variable or
value is passed by reference.
- Packages are not supported.
There are some inline assembler constructs which are not supported, and since Free Pascal is
designed to be platform independent, it is quite unlikely that these constructs will be supported in
Note that the -Mobjfpc mode switch is to a large degree Delphi compatible, but is more strict
than Delphi. The most notable differences are:
- Parameters or local variables of methods cannot have the same names as properties of
the class in which they are implemented.
- The address operator is needed when assigning procedural variables (or event handlers).
- AnsiStrings are not switched on by default.
- Hi/Lo functions in Delphi are always evaluated using a word argument, in FPC there
are several overloaded versions of these functions, and therefor the actual type of the
passed variable is used to determine which overload is called. This may result in different