I'm trying to read a text file line by line using Inno Setup.
I have tried this one that mentioned here: 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;
But it will give error, on FileOpen
(and maybe on other File functions) that it is an unknown identifier. Where is the problem?
The file is less than 50kb.