Вот кусок кода:
...
procedure TForm1.Button1Click(Sender: TObject);
var
count:integer;
sFile: string;
Ini: TIniFile;
begin
if not FileExists(sFile) then
begin
Ini:=TIniFile.Create('D:\test.ini');
Ini.WriteInteger('General', 'count', 0);
Ini.Free;
end;
sFile := 'D:\test.ini';
if FileExists(sFile) then
begin
Ini := TIniFile.Create(sFile);
Ini.ReadInteger('General', 'count', count);
count:=count+1;
Ini.WriteInteger('General', 'count', count);
{или так
Ini.WriteInteger('General', 'count', count+1);
никакой разницы}
Ini.Free;
end;
end;
...
Здесь не обновляется count всё время устанавливает в одной проге 1, а тут
Ну почему ???
И выводит
count=4357785
Ну помогите разобраться
