我也在思考这种问题:<br>procedure TForm1.Button1Click(Sender: TObject);<br>Var FS:TfileStream;<br> Buf:array of byte;<br>Begin<br> setlength(buf,100);<br> FS:=TFileStream.Create('c:/1.gif', fmOpenRead);<br> FS.Position:=0;<br> FS.Read(Buf,100);<br> FS.Free;<br> buf[0]:=$19;<br> FS:=TFileStream.Create('c:/11.gif', fmOpenWrite or fmCreate);<br> FS.Write(Buf,100);<br> FS.Free;<br>end;<br>上面代码编译不出错,执行有错误。这是什么回事啊