procedure Tcform.N9Click(Sender: TObject);
var
F: TextFile;
FileName: string;
str: UnicodeString;
begin
FileName := ExpandFileName('file.txt');
AssignFile(F, FileName);
Reset(F); //只读打开
while not Eof(F) do
begin
Readln(F, str); //读取每行
ShowMessage(str);
end;
CloseFile(F);//关闭文件
end;
网友评论