procedure TForm1.Button1Click(Sender: TObject);
var
testRange: array [0..5]of Integer;
index: Integer;
begin
index := 6;
ZeroMemory(@testRange, SizeOf(testRange));
try
testRange[index] := 6;
Self.Caption := IntToStr(testRange[index]);
except
on e: Exception do
Self.Caption := '测试错误:' + e.Message;
end;
end;
顶了一个以前的帖上来,你可以去浏览下