|
Use SetLength if the array if all arrays of one dimension have the same size.
If the sizes are different, use Copy() on every array of the most inner dimension.
For 2D, this would be like this:
Src,Dst: array of array of Integer;
SetLength(Dst,Length(Src));
for I:=Low(Dst) to High(Dst) do
Dst[I]:=Copy(Src[I]);
For 3D:
Src,Dst: array of array of array of Integer;
SetLength(Dst,Length(Src));
for I:=Low(Dst) to High(Dst) do begin
SetLength(Dst[I],Length(Src[I]));
for J:=Low(Dst[I]) to High(Dst[I]) do
Dst[I][J]:=Copy(Src[I][J]);
end;
|