Our code for INI files is based on Grigory Filatov and Janusz Pora code.
Is got to mention that its support for types:
Character/Memo, Numeric, Date, Logical, Array and CodeBlocks too
_GetIni brings in that kind of types but is very important to previous create all variables or in arrays accordingly it types and values (not just declared neither as Nil). Otherwise aways will bring as character or most probably without empty value.
Normally we use like this:
Code: Select all
BEGIN INI FILE (cExeFPath + "Stru.ini")
GET cFixedLang SECTION "Default" ENTRY "Language"
GET cRDD SECTION "Default" ENTRY "RDD"
GET cBorders SECTION "Default" ENTRY "Borders"
GET cBPreview SECTION "Default" ENTRY "Preview"
END INICode: Select all
BEGIN INI FILE (cExeFPath + "Stru.ini")
cFixedLang := _GetIni( "Default", "Language",, cFixedLang )
cRDD := _GetIni( "Default", "RDD",, cRDD )
cBorders := _GetIni( "Default", "Borders",, cBorders )
cBPreview := _GetIni( "Default", "Preview",, cBPreview )
END INILeaving registered the tip ! I hope be useful.