D.3 Delphi mode
This mode is selected by the $MODE DELPHI switch. It tries to emulate, as closely as possible, the behavior of
Delphi 4. On the command-line, this mode is selected by the -Mdelpih switch.
1. You can not use the address operator to assign procedural variables.
2. A forward declaration must not be repeated exactly the same by the implementation of a function/procedure. In particular, you not omit the parameters when implementing the function or procedure.
3. Overloading of functions is not allowed.
4. Nested comments are not allowed.
5. The Objpas unit is loaded right after the system unit. One of the consequences of this is that the type Integer is redefined as Longint.
6. Parameters in class methods can have the same names as class properties (although it is bad programming practice).
D.5 OBJFPC mode
This mode is selected by the $MODE OBJFPC switch. On the command-line, this mode is selected by the -Mobjfpc switch.
1. You must use the address operator to assign procedural variables.
2. A forward declaration must be repeated exactly the same by the implementation of a function/procedure. In particular, you can not omit the parameters when implementing the function or procedure.
3. Overloading of functions is allowed.
4. Nested comments are allowed.
5. The Objpas unit is loaded right after the system unit. One of the consequences of this is that the type Integer is redefined as Longint.
6. You can use the cvar type.
7. PChars are converted to strings automatically.
8. Parameters in class methods cannot have the same names as class properties.
Bookmarks