# Ini file sample.

This sample shows how the same Pascal operators can be used both for read and write for the same variables, when working with TIniFile:

        procedure ReadWriteIni( Write: Boolean );
        var Ini: PIniFile;
        begin
          Ini := OpenIniFile( 'MyIniFile.ini' );
          Ini.Section := 'Main';
          if Write then            // if Write, the same operators will save
             Ini.Mode := ifmWrite; // data rather then load.
          MyForm.Left := Ini.ValueInteger( 'Left', MyForm.Left );
          MyForm.Top  := Ini.ValueInteger( 'Top',  MyForm.Top );
          Ini.Free;
        end;

This help is generated by KOL Help generator, (C) 2000-2001 by Vladimir Kladov
Modified (C) 2003 by Alexander Bartov