|
Programs - Ini unitAimThe resson for writing the ini unit was when it got to working out the algorithim for changing the values it was acctually quite complicated and its good to seperate the code because it allows more flexability. MethodTo read a value from a section was realativly simple, just scan for your section, then look for the setting. If neither were found simply return the default value. That however was the easy part of the programming. To write a value to a file its not just as simple as going to that line in the file and replacing it! To change one line the whole file needs to be re-written. So the algorithim for the writing of a value goes as follows:
Complicated!, even so only four procedures / functions are used: read and write, strings and integers. The interger side uses the string functions but just converts where nessary. Thats all there is to it. |