type
TComplex = record
Real : Single;
Imag : Single;
end;
TKArray=array [1..2048,1..2048] of TComplex;
var
lcArr:TKArray;
lcC:Integer;
lcArr2:Array of Array of TComplex;
begin
Memo1.Lines.Clear;
Memo1.Lines.Add('TKArray [2048 x 2048]:');
lcC:=SizeOf(lcArr);
Memo1.Lines.Add('总大小:'+IntToStr(lcC)); {33554432}
lcC:=SizeOf(TComplex);
Memo1.Lines.Add('元素大小:'+IntToStr(lcC)); {8}
lcC:=SizeOf(lcArr) div SizeOf(TComplex);
Memo1.Lines.Add('元素个数:'+IntToStr(lcC)); {4194304}
Memo1.Lines.Add('--------------------------------------');
Memo1.Lines.Add('第一维元素个数:'+IntToStr(Length(lcArr))); {2048}
Memo1.Lines.Add('第二维元素个数:'+IntToStr(Length(lcArr[1]))); {2048}
Memo1.Lines.Add('--------------------------------------');
Memo1.Lines.Add('动态数组');
SetLength(lcArr2,1024,1024);
Memo1.Lines.Add('第一维元素个数:'+IntToStr(Length(lcArr2))); {1024}
Memo1.Lines.Add('第二维元素个数:'+IntToStr(Length(lcArr2[0]))); {1024}