procedure TForm1.Button1Click(Sender: TObject);<br>var<br> F: File;<br> Buf: array [0..0] of Char;<br>begin<br> AssignFile(F, 'test.dat');<br> ReWrite(F, 1);<br> try<br> BlockWrite(F, Buf, 1);<br> Seek(F, 11); //改变文件大小为11+1=12字节。<br> BlockWrite(F, Buf, 1);<br> finally<br> CloseFile(F);<br> end;<br>end;