var
recordfile:TFile;
ifeof:Boolean;
begin
 assignfile(recordfile,  'c:\record.dat');
 reset(recordfile, 1);
 blockread(recordfile, X , sizeof(X ), ifeof);
end;
end;

解决方案 »

  1.   

     finally
      closefile(recordfile);
      

  2.   

    to wangzh(独孤求问):
    blockread 的第四个参数不是数字型的吗?
      

  3.   

    应该一样啊,这个还没有达到需要Align字段的情况,结果应该是一样:7!
    这个讨论,已经我回答过。搜索Packed就可以找到。
      

  4.   

    呵呵,对不起,是我马虎了。
    ifeof: integer;
      

  5.   

    to Kingron(戒网中……):你试过了吗,前两天的帖子我看了
    但我试了好像还是按4个字节对齐的::(
    to wangzh(独孤求问):呵呵,谢谢你
      

  6.   

     try it another time.