楚
楚辞
Unregistered / Unconfirmed
GUEST, unregistred user!
OpenDialog1: TOpenDialog; Memo1: TMemo; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject); var f1:textfile;//¶¨ÒåÎļþ±äÁ¿ a:string;begin if opendialog1.Execute then //Èç¹û¶Ô»°¿ò³É¹¦´ò¿ª memo1.Clear ; assignfile(f1,opendialog1.FileName );//°ÑÎļþÃû°ó¶¨µ½Îļþ±äÁ¿ÉÏ reset(f1); while not eof(f1) do //Èç¹ûûÓжÁµ½Îļþĩ⣬¼ÌÐø¶ÁÈ¡ begin application.ProcessMessages //·ÀÖ¹³ÌÐò¼ÙËÀ ReadLn(f1,a); //ReadLn这个地方报错[Error] Unit1.pas(40): Missing operator or semicolon memo1.Lines.Add(a); end; closefile(f1);//¹Ø±ÕÎļþ end;