Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Jonas Maebe
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 sugge

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Jürgen Hestermann
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 o

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Sven Barth
Am 15.10.2010 11:27, schrieb Michael Van Canneyt: On Fri, 15 Oct 2010, Jonas Maebe wrote: On 15 Oct 2010, at 11:07, Sven Barth wrote: Am 14.10.2010 14:50, schrieb Uffe Kousgaard: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Michael Van Canneyt
On Fri, 15 Oct 2010, Jonas Maebe wrote: On 15 Oct 2010, at 11:07, Sven Barth wrote: Am 14.10.2010 14:50, schrieb Uffe Kousgaard: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*2; end; Add {$mode delphi} at the top of your u

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Sven Barth
Am 15.10.2010 11:13, schrieb Jonas Maebe: On 15 Oct 2010, at 11:07, Sven Barth wrote: Am 14.10.2010 14:50, schrieb Uffe Kousgaard: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*2; end; Add {$mode delphi} at the top of your un

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Jonas Maebe
On 15 Oct 2010, at 11:07, Sven Barth wrote: Am 14.10.2010 14:50, schrieb Uffe Kousgaard: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*2; end; Add {$mode delphi} at the top of your unit, then this "Delhpi compatible" syntax wi

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Michael Van Canneyt
On Thu, 14 Oct 2010, Uffe Kousgaard wrote: While trying to make delphi code compatible with FPC, I have hit this issue: Delphi allows: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*2; end; FPC requires the full declaration to b

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Sven Barth
Am 14.10.2010 14:50, schrieb Uffe Kousgaard: While trying to make delphi code compatible with FPC, I have hit this issue: Delphi allows: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*2; end; FPC requires the full declaration to be

Re: [fpc-pascal] declaration of functions

2010-10-15 Thread Jonas Maebe
On 14 Oct 2010, at 14:50, Uffe Kousgaard wrote: While trying to make delphi code compatible with FPC, I have hit this issue: Delphi allows: interface function somefunction(a: integer): integer; implementation function somefunction; begin result:= a*2; end; FPC requires the full declaratio