> On Apr 4, 2017, at 9:46 PM, Sven Barth via fpc-pascal
> <[email protected]> wrote:
>
> SetLength() allocates a single block of memory, cause array access is
> ordinary pointer arithmetic. However if you have an array of array then
> the first array stores a pointer to each sub array.
>
> E.g. the following would be valid, too:
>
> === code begin ===
>
> var
> arr: array of array of Integer;
> begin
> SetLength(arr, 10, 10);
“then the first array stores a pointer to each sub array.”
Could you illustrate this is code? I don’t think I’m understanding this exactly
like it’s represented in memory. There’s only one “sub array” in this 2x2 array
so how does that look in memory?
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal