(Gast)
n/a Beiträge
|
3D Dynamic Array
11. Jan 2010, 00:21
Hello,
ok i have a problem with 3d dimensional dynamic array.How could i set each dimension seperatly.String value
Delphi-Quellcode:
Something 0
Another 0
That 0
Another 1
That 0
Delphi-Quellcode:
procedure TForm5.Button1Click(Sender: TObject);
var
i,j,l:integer;
multiArray : Array of Array of array of string;
begin
// Set the length of the 1st dimension of the multi-dim array
SetLength(multiArray,10);
// Set the length of the 3 sub-arrays
SetLength(multiArray[0],5);
SetLength(multiArray[1],5);
SetLength(multiArray[2],5);
SetLength(multiArray[0][0],1);
SetLength(multiArray[1][1],1);
SetLength(multiArray[2][2],1);
// Set elements of this array
multiarray[0,0,0]:='a'; //<< only sets last dimension
end;
|
|
Zitat
|