[fpc-pascal] Two-dimensional dynamic arrays in C libraries

Silvio a Beccara s.abeccara at email.it
Fri Jul 15 22:09:01 CEST 2005

Hi everybody,

I need to pass two- or three-dimensional dynamic arrays to C libraries from 
FPC. I know this is feasible with one-dimensional arrays, by using a pointer 
to the array: for instance 

PDouble = ^Double;

function get_array(a, b: PDouble; size: integer; value: double): 
integer; cdecl; external 'mylib.dll';

qq := get_array(PDouble(mat1),PDouble(mat2),kk,3.14);

---end code

but it doesn't seem to work with more dimensions. How could I do?
Thanks, best regards

Silvio a Beccara
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
  Vuoi bere tanta acqua pura e risparmiare ben 495 euro all'anno?
* Con BeviSano avrai finito di comprare acqua in bottiglia - clicca qui 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3628&d=15-7

More information about the fpc-pascal mailing list