你是说要刷新文件缓冲区!
不同的文件类型有不同的方法:#include <stdio.h>
int fflush(FILE *f);
这是标准C的文件刷新方法;

解决方案 »

  1.   

    对不起,你是DELPHI,我当成C了
      

  2.   


    The Flush functionThe Flush function is called at the end of each Read, Readln, Write, and Writeln. It can optionally flush the text-file buffer.
    If Mode is fmInput, the Flush function can store zero in BufPos and BufEnd to flush the remaining (unread) characters in the buffer. This feature is seldom used.
    If Mode is fmOutput, the Flush function can write the contents of the buffer exactly like the InOut function, which ensures that text written to the device appears on the device immediately. If Flush does nothing, the text doesn抰 appear on the device until the buffer becomes full or the file is closed.
      

  3.   

    BOOL FlushFileBuffers(
        HANDLE hFile  // open handle to file whose buffers are to be flushed 
       );
    这是API刷新文件缓冲区的方法,能通用;
      

  4.   

    procedure Flush(var F: Text);