[fpc-pascal] declaration of functions

Jonas Maebe jonas.maebe at elis.ugent.be
Fri Oct 15 20:50:00 CEST 2010


On 15 Oct 2010, at 17:18, Jürgen Hestermann wrote:

> Sven Barth schrieb:
>>> FPC requires the full declaration to be repeated. Can this be avoided
>>> somehow? I have many functions/procedures without full declaration in
>>> the implementation part.
>> Add
>> {$mode delphi}
> 
> I would not suggest to use {$mode delphi}
> but {$ModeSwitch REPEATFORWARD+} instead.
> This only changes one behaviour while {$mode delphi}
> changes a lot (possibly unwanted) other things too.

Since he's porting Delphi code, {$mode delphi} is definitely the way to go. Just enabling REPEATFORWARD will e.g. keep integer=smallint, which undoubtedly will cause further problems.


Jonas


More information about the fpc-pascal mailing list