返回值为 Record类型的函数 初始化 Result

function TMiTeC_Storage.GetPhysInfo(Index: integer): TDeviceInfo;
begin
  Finalize(Result);
  FillChar(Result,SizeOf(TDeviceInfo),0);
  if (Index>=0) and (Index<Length(FPHYS)) then
    Result:=FPHYS[Index];
end;

MiTeC控件的写法

原文地址:https://www.cnblogs.com/CodeGear/p/4620876.html