Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-08

FPC's Delphi mode incompatibility with Delphi compiler

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

We are using {$Mode Delphi} in the tiOPF project. Three new functions were added to one of the base classes. It compiled without issues under FPC 2.2.3 (and whatever Michael van Canneyt uses).

I tried to compile that code under Delphi 7, after somebody reported the issue under Delphi 2006.

    procedure   DoGetFieldBounds(const AFieldName: String; var
MinValue, MaxValue: Integer; var HasBounds: Boolean); virtual;
overload;
    procedure   DoGetFieldBounds(const AFieldName: String; var
MinValue, MaxValue: Extended; var HasBounds: Boolean); virtual;
overload;
    procedure   DoGetFieldBounds(const AFieldName: String; var
MinValue, MaxValue: TDateTime; var HasBounds: Boolean); virtual;
overload;

The 'virtual' and 'overload' keywords had to be swapped around for it to compile under Delphi.

    procedure   DoGetFieldBounds(.....); overload; virtual;

Maybe the Delphi mode in FPC should check for that as well?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys: We are using {$Mode Delphi} in the tiOPF project. Three new functions were added to one…
Graeme Geldenhuys wrote 22 lines
Hi, We are using {$Mode Delphi} in the tiOPF project. Three new functions were added to one of the base classes. It compiled without issues under FPC 2.2.3 (and whatever Michael van Canneyt uses). I tried to compile that code under Delphi 7, after somebody reported the issue under Delphi 2006. procedure DoGetFieldBounds(const AFieldName: String; var MinValue, MaxValue: Integer; var HasBounds: Boolean); virtual; overload; procedure DoGetFieldBounds(const AFieldName: String; var MinValue, MaxValue: Extended; var HasBounds: Boolean); virtual; overload; procedure DoGetFieldBounds(const AFieldName: String; var MinValue, MaxValue: TDateTime; var HasBounds: Boolean); virtual; overload; The 'virtual' and 'overload' keywords had to be swapped around for it to compile under Delphi.

Now you'll suspect that I knew fully well why I did the overtype bug ;)

Michael.

Reply by email