Q
quitelei
Unregistered / Unconfirmed
GUEST, unregistred user!
动态数组赋值用copy()函数出问题了,100分相送
type
AIAreaDataArray= Array of Array of double;//二维数组
AIAreaDataArrayArray= Array of AIAreaDataArray
//三维数组
var
AIData:AIAreaDataArray;
A:AIAreaDataArrayArray;
i:integer;
////////
begin
setlength(AIData,10,10);
setlength(A,11);
for i:=1 to 10 do
begin
AIData[1][1]:=i;
A:=copy(AIData);
end;
end
结果设想是A[1][1]应该等于i,是从1到10变化的,但实际情况是全为10
type
AIAreaDataArray= Array of Array of double;//二维数组
AIAreaDataArrayArray= Array of AIAreaDataArray
//三维数组
var
AIData:AIAreaDataArray;
A:AIAreaDataArrayArray;
i:integer;
////////
begin
setlength(AIData,10,10);
setlength(A,11);
for i:=1 to 10 do
begin
AIData[1][1]:=i;
A:=copy(AIData);
end;
end
结果设想是A[1][1]应该等于i,是从1到10变化的,但实际情况是全为10