[fpc-pascal]Synapse for FPC

Florian Klaempfl Florian.Klaempfl at gmx.de
Thu Jul 24 09:33:19 CEST 2003


Lukas Gebauer wrote:
> For little example: On Delphi workd exists structure TSystemTime.
> Thjis is defined in Windows.pas, and all related time functions on
> delphi using this structure. For example, lot of functions inside
> sysutils.pas. it allows get system time by Win32 API call and then
> you can handle returned value by lot of functions in Sysutils.pas.
> This is great...
> 
> Now Look to FPC: windows.pas have one TSystemTime record... and
> sysutils using another TSystemTime structure. Two different
> structures with same name! Now I must get system time by API call, I
> must CONVERT IT to another structure... and then I can continue.

That's indeed a problem but there is no solution which works in all 
cases if you want multiplatform developemt. At least 1.1 allows type 
aliasing which causes problems in 1.0.x. But there are also some 
"strategic reasons" why 1.0.x isn't very much compatible with Delphi: 
the goal for 1.0.x was a 32 bit compiler understanding the subset 
defined by Turbo Pascal of object pascal. It was planned to achieve 
Delphi compatiblity as far as possible but if there was a choice between 
stability of the compiler and delphi compatibility we prefered 
stability, that's why 1.0.x doesn't have e.g. interfaces or multi 
threading support. For 2.0, i.e. the 1.1 development branch which will 
become 2.0, the goal is to compile as much as possible delphi code 
without changes.





More information about the fpc-pascal mailing list