[fpc-pascal] Questions regarding arrays
befelemepeseveze at gmail.com
Thu Sep 23 09:50:18 CEST 2010
2010/9/23 Graeme Geldenhuys <graemeg.lists at gmail.com>:
> Out of interest. Do you know if dynamic array elements are in sequence
> (storage area in memory) too - like static arrays? So could I do the
> same as above, but instead of using a static array, use a dynamic
> array, and pass the address of the first element to the C API?
AFAIK yes as long as you don't break (it's possible using some wild
casting) the ref counting mechanism and handle the zero length case.
V1: array [L..H] of T;
V2: array of T;
if Length(V2) <> 0 then
More information about the fpc-pascal