If you're not afraid of the VCL you can use the Inifiles unit.

Then all you need to do is this:
[pascal]
procedure Save;
var
Ini: TIniFile;
a,b: Integer;
s: String;
// you can use other types also
begin
a := 12;
b := -85;
s := 'hello';

Ini := TIniFile.Create('MyIni.ini');
try
// title property value
Ini.WriteInteger('Something', 'A', a);
Ini.WriteInteger('Something', 'B', b);
Ini.WriteString ('Something', 'S', s);
finally
Ini.Free;
end;
end;

procedure Load;
var
Ini: TIniFile;
a,b: Integer;
s: String;
begin
Ini := TIniFile.Create('MyIni.ini');
try
// title property defaultvalue
Ini.ReadInteger('Something', 'A', 1000);
Ini.ReadInteger('Something', 'B', 99);
Ini.ReadString ('Something', 'S', 'test');
finally
Ini.Free;
end;
end;
end;
[/pascal]