//循环逐行读取Text内容
procedure TForm1.Button1Click(Sender: TObject);
Var
Fil: TextFile;
Str: String;
begin
AssignFile(Fil, ExtractFilePath(Application.ExeName) + 'GroupNumber.txt'); //关联文件
Reset(Fil);
while Not Eof(Fil) do
Begin
Readln(Fil, Str);
Showmessage(Str);
End;
CloseFile(Fil);
end;
TextFile
最新推荐文章于 2023-09-09 06:20:57 发布