Registriert seit: 15. Jun 2010
Ort: Augsburg Bayern Süddeutschland
3.470 Beiträge
Delphi XE3 Enterprise
|
AW: Mehrdimensionalles Dynamisches Array Kopieren.
7. Mär 2013, 16:45
Delphi-Quellcode:
Type
TARR=Array of Array Of Array of String;
procedure TForm1.Button1Click(Sender: TObject);
var
a,b:TArr;
i,j,k:Integer;
begin
SetLength(a,10);
for I := 0 to High(a) do
begin
SetLength(a[i],i+1);
for j := 0 to High(a[i]) do
begin
SetLength(a[i][j],j+1);
for k := 0 to High(a[i][j]) do a[i][j][k] := Format('%d - %d - %d',[i,j,k]);
end;
end;
b := Copy(a,0,Length(a));
for I := 0 to High(a) do
begin
SetLength(a[i],i+1);
for j := 0 to High(a[i]) do
begin
SetLength(a[i][j],j+1);
for k := 0 to High(a[i][j]) do a[i][j][k] := '';
end;
end;
SetLength(a,0);
for I := 0 to High(b) do
begin
for j := 0 to High(b[i]) do
begin
for k := 0 to High(b[i][j]) do
Memo1.Lines.add(b[i][j][k]);
end;
end;
end;
Thomas Wassermann H₂♂ Das Problem steckt meistens zwischen den Ohren
DRY DRY KISS
H₂♂ (wenn bei meinen Snipplets nichts anderes angegeben ist Lizenz: WTFPL)
|
|
Zitat
|