[fpc-devel] Problem with open arrays

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Aug 15 11:12:08 CEST 2006


On 15 Aug 2006, at 09:13, Peter Popov wrote:

> I have the following question: how are open array parameters  
> currently implemented in FPC? The reason I am asking is that I am  
> using DLL functions in C which rely on borland's syntax, that is,
>
> void __cdecl SomeProc(const double *coords, const int high) (in C++  
> Builder)
>
> is equivallet to either of the following Delphi constructs:
>
> procedure SomeProc1(const coords: array of Double); cdecl;
>
> or
>
> PDouble = ^Double;
> procedure SomeProc2(const coords: PDouble; const high: Integer);  
> cdecl;

It's the same in FPC. However as you say, that's "currently". You  
should not rely on internal implementations, it's a recipe for disaster.


Jonas




More information about the fpc-devel mailing list