是不是,count+100是integer而不是shortint了呢?

解决方案 »

  1.   


    newfile  : TextFile;
    count : Char;
      

  2.   

    现在需要一定按照字节来读文件,写文件,比如要写入ASCII为FF的字符,怎么办?紧急!!!
      

  3.   

    newfile  : TextFile;
    count : Char;就可以呀!
      

  4.   

    1)写入write(newfile,count+100)错误可能是count+100超出了Byte的范围。该成integer或Longint;另外:write(newfile,count+100);写成:
       count:=count+100;
       Write(newfile,count);
    2) 
    var
      F:file of char;
      Mchar:char;
    begin
       ……//关联文件,打开文件
      Mchar:=#FF;
      Write(F,Mchar);
       ……
    end;