Inifiles
An Inifile is a text based file which contents [sections] and keys.
A section groups items which have the same purpose. Each of them is a key entry.
create an inifile
procedure procedurename;
var lib:IniFile;//inifile declaration
begin
.....
ini:=TInifile.create(inifilename); //inifile creation
try //secured bloc
ini.writestring('section','key',keystringvalue); //write a string in the file
....
finally
ini.free;
end; //from secured bloc
...
end; //from procedure
close an Inifile (look at the previous example)
ini.free:
Erase a section
inifile.eraseSection(sectionname);
write a string in the file
ini.writestring('section','key','value'); //write a string in the file
the result in the file will be :
[section]
key=value
read a string
var texte:string;
.....
texte=ini.ReadString('words',txt,'');
the parameters are :