刘 刘亚林 Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-25 #1 一维数组用setlength(myArray,长度); 那么二维数组呢? 我如何在定义时把它定义成动态的?然后又怎么样动态改变它的长度?
Y yostgxf Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-26 #2 例子: var A : array of array of string; I, J : Integer; begin SetLength(A, 10); for I := Low(A) to High(A) do begin SetLength(A, I); for J := Low(A) to High(A) do A[I,J] := IntToStr(I) + ',' + IntToStr(J) + ' '; end; end;
例子: var A : array of array of string; I, J : Integer; begin SetLength(A, 10); for I := Low(A) to High(A) do begin SetLength(A, I); for J := Low(A) to High(A) do A[I,J] := IntToStr(I) + ',' + IntToStr(J) + ' '; end; end;
E ETimeFly Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-26 #3 同意楼上的,在delphi中多维数组其实就是数组的数组……(array of array ……)
雪 雪中漫步 Unregistered / Unconfirmed GUEST, unregistred user! 2004-02-26 #4 简单点 A : array of array of string; ... setlength(a,5,10)