Talk:Using INI Files
From Lazarus wiki
Jump to navigationJump to search
This part of the example is superfluous:
...
if not FileExists(IniFile) then begin
Sett := TIniFile.Create(IniFile);
Sett.UpdateFile; // Create empty file.
Sett.free;
end;
You can use TIniFile.ReadXXX on a non existing file: it will return the value you supplied as "default" (it does the same for an empty file). --Bart (talk) 23:53, 24 April 2021 (CEST)