OBJFPC mode
This mode is selected by the $MODE OBJFPC switch. On the command line, this mode is selected by the -Mobjfpc switch.
Exceptions, classes and Interfaces are enabled.
You must use the address operator to assign procedural variables.
A forward declaration must be repeated exactly the same by the implementation of a function/procedure. In particular, you cannot omit the parameters when implementing the function or procedure, and the calling convention must be repeated as well.
Overloading of functions is allowed.
Nested comments are allowed.
The Objpas unit is loaded right after the
systemunit. One of the consequences of this is that the typeIntegeris redefined asLongint.You can use the cvar type.
PChars are converted to strings automatically.
Parameters in class methods cannot have the same names as class properties.
Strings are shortstrings by default. You can use the
-Shcommand line switch or the{$H+}switch to change this.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
