解释下SetLength(Result,Size)中的SIZE
在李维的Delphi.5.X.ADO.MTS.COM+高级程序设计篇中第三章104页上有这么一段:
function TForm1.BlobContentToString(const FileName: string): string;
begin
with TFileStream.Create(FileName,fmOpenRead) do
try
SetLength(Result,Size);
Read(Pointer(Result)^,Size);
finally
end;
end;
请帮我解释下其中的Size变量在哪声明的呀,那个Result变量是不是每个函数公用它,它总是返回上一次调用过的函数返回值的呀!!
谢了!!