> On Apr 4, 2017, at 4:58 PM, Howard Page-Clark via fpc-pascal
> <[email protected]> wrote:
>
> You can always use FillChar and its kin on specific 'nested' arrays like this
>
> type
> TIntArray = array of Integer;
> TIntIntArray = array of TIntArray;
> TIntIntIntArray = array of TIntIntArray;
>
> procedure FillArray(const anArray: TIntIntIntArray; aValue: DWord);
> var
> x, y: integer;
> begin
> for x:=0 to High(anArray) do
> for y:=0 to High(anArray[x]) do
> FillDWord(anArray[x][y][0], Length(anArray[x][y]), aValue);
> end;
Doesn’t iterating the array default the purpose of FillChar? The goal was the
most efficient way clear the array with zero’s. Even if the array if nested 3
levels deep (anArray[x][y][z]) it should (I hope) be a contiguous block of
memory that was allocated (correct me if I wrong please).
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal