var
 myFile:File of Byte; //类型文件,每记录一个字节 
 aa:byte;
 bb:array[1..10] of byte;
begin
 aa:=66;  //'B'的ASCII码
 for i:=1 to 10 do
  bb[i]:=byte('a')+1; //分别给变量赋值
 assign(myFile,'你的文件名');
 try
  reset(myFile);
  seek(myFile,3); //定位到第3个字节处
  write(myFile,aa); //写入一个字节,如果该位置原来是'A'则现在是'B'
  seek(myFile,200); //重新定位到第200个字节处
  write(myFile,bb); //写入10个字节
 finally
  closeFile(myFile);
 end;  //end of try
end;