[fpc-devel] Problem with open arrays

Peter Popov ppopov at tamu.edu
Tue Aug 15 09:13:32 CEST 2006

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;


PDouble = ^Double;
procedure SomeProc2(const coords: PDouble; const high: Integer); cdecl;

This allows seamless integration of Delphi functions with open arrays into  
C++ code and vice versa.

I know that fpc does not like open array functions declared with cdecl. So  
I am wondering wath is the internal representation and are such functions  
binary equivalent to the above C++ example?

For more information, see bug:  

Peter Popov

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

More information about the fpc-devel mailing list