while memo1.text not eof;
错在哪?

解决方案 »

  1.   

    function Eof(var F): Boolean;
    n Delphi code, Eof tests whether the current file position is the end-of-file. F is a file variable that has been opened for reading. If F is omitted, the standard file variable Input is assumed. Eof(F) returns true if the current file position is beyond the last character of the file or if the file is empty; otherwise, Eof(F) returns false.Note: Eof fails if the file F has been opened in write-only mode. For example, you can抰 use Eof with files opened using the Append or Rewrite, which open a file in write-only mode
    //////////////////////看看帮助,你把eof的用法搞混了
    我猜你想要实现的是这个功能
    procedure TForm1.Memo1Change(Sender: TObject);
    begin
        while memo1.Text = '' do
        showmessage('空……');
    end;