Welcome! Thank you for using 'INI'.
This page is very ugly, because I was write it in 5 minutes. My english is bad - sorry. And: please read "how to use", because you must set some thinks at start of program.
1. How to install
'INI'?
It is very easy. Copy INI.PAS somewhere into Delphi directory - I've got it in Delphi
directory/lib. It's installed!
2. How to use 'INI'?
This is very easy too, but it can crash, if you do not use it right.
Procedures and functions:
Reading INI file - readini - declaration:
function readini(group,rec:string):string;
Group: group in INI file (if you look i.e. win.ini, there are groups: [main],
[something], ...)
Rec: record (goals=5, printer=Epson)
':string': returns record value (goals=5, printer=Epson).
Writing in INI file - writeini - declaration:
procedure writeini(group,rec,value:string);
group: see in reading
rec: see in reading
value: record value (goals=5, printer=Epson).
Creating INI file - createini - declaration:
procedure createini(clear_if_exist:boolean);
Creates new INI file - clear_if_exist means if it rewrite (clear) the
file, if it already exists.
InWhatLine function - declaration:
function inwhatline(group,rec:string):integer;
This function can be used like readini, but it returns to you an integer
value - in what line is writed that record.
Deleting FROM .ini file - deleteini - declaration:
procedure deleteini(group,rec:string);
WARNING!!! This does not delete the INI file - it deletes part of it. If you wish
to delete INI file, use windows function "deletefile" - just write "deletefile(inipath);" - do not replace inipath
with something other, because it is variable that you set at the start.
So. Use deleteini('mygroup','myrecord');, if you want to
delete record myrecord in group mygroup. If you wish to delete all
records in group (and group, of course), use deleteini('mygroup','');.
3. Freeware?
No. 'INI' is not freeware. IT IS IN PUBLIC DOMAIN!!! You can freely
change it's source code, copy it, delete it, rename it, ...
You can sell it too, but you must tell to your buyer, that he/she can get this file free,
because it is in public domain...
You've got source code and it may working in all versions of Delphi. I have no C (C++), so I do not know, if it is working there to - it may.
You can contact me...: Matija.Polajnar@guest.arnes.si. If you were change the code (and it's better than my one), you can send it on my email. But please consider, that 'INI' is my unit, and I will use it in my programs and copy it under my name.
Again: thank you to using this unit!