【发布时间】:2022-06-22 22:05:29
【问题描述】:
我正在尝试使用 Inno Setup 逐行读取文本文件。
我试过这里提到的这个:https://jrsoftware.org/ispphelp/index.php?topic=fileread
function ShowLines(): Boolean;
var
list: Integer;
begin
list := FileOpen(ExpandConstant('{tmp}\file.txt'));
if !FileEof(list) then begin
try
repeat
MsgBox(FileRead(list), mbInformation, MB_OK);
until !FileEof(list);
finally
FileClose(list);
end;
end;
Result := True;
end;
但它会在FileOpen(可能在其他文件函数上)给出错误,它是一个未知的标识符。问题出在哪里?
文件小于 50kb。
【问题讨论】: