procedure TForm1.Button1Click(Sender: TObject);
var
s:string;
i,j,k:integer;
arr:Array of array of array of string;
lst:TStringList;
begin
lst:=TStringlist.Create;
setLength(arr,10,10,10);
for i := low(arr) to High(arr) do begin
s:=‘‘;
for j := low(arr[i]) to High(arr[i]) do begin
for k := low(arr[i][j]) to High(arr[i][j]) do begin
arr[i][j][k]:=intToStr(k)+intToStr(j)+intToStr(i);
s:=s+‘ ‘+arr[i,j,k];
end;
end;
lst.Add(s);
end;for j:=0 to lst.Count-1 do
memo1.Lines.Add(lst[J]);
lst.free;
end;
Delphi 二維數組 和 多維數組,布布扣,bubuko.com
时间: 2024-11-03 05:27:14