[fpc-devel] delphi compatibility issues

Mario R. Carro mcarro at gmx.net
Fri May 25 15:23:44 CEST 2007

Hi, I'm trying to compile the JCL with FreePascal (the common, unix and vcl 
folders). Excluding the portability errors in the JCL, I found some issues 
that I think could be best solved by FPC (and benefit the porting of any 
other Delphi project also). I'm using FPC from SVN (updated daily). 

Here is a little list:

- Some assembler does not compile. For example this function, in JclLogic.pas:

procedure SetBitBuffer(var Value; const Bit: Cardinal);
  BTS    [Value], Bit

This unit can be compiled with FPC defining PUREPASCAL but with degraded 
performance in many functions. 

- Interface implementation delegation requires an interface type (but Delphi 
accepts classes). For example, in JclSchedule.pas:

    property DailyFreq: TDailyFreq read FDailyFreq implements 

where TDailyFreq is a class (derived from TAggregatedObject).

- Classes implementing interfaces must implement all the interface methods 
(but Delphi compiles the code happily without them). See, for example, the 
class TSchedule in JclSchedule.pas. Adding virtual abstract declarations for 
the missing methods to the class solves the problem in FPC in a Delphi 
compatible way. Perhaps FPC should do it automatically in those cases?

- THashedStringList does not exist. I already posted a bug implementing this 
class, but it didn't reach SVN yet.

Comments are welcome. Please let me know if you think any of them should be 
solved on the JCL side.


More information about the fpc-devel mailing list