SoCoder -> Snippet Home -> File Access
Created : 25 October 2009
Edited : 25 October 2009
System : Windows
Language : Cobra
SettingsManage ini files
A simple unit to load a set of key=value pairs from a file, manipulate them in your program and save them again.
It supports multiple files so you could have separate defaults and user profiles, and tracks which values have been modified so you could save the changes only to the user file.
ReadSetting(key, byref value)
ReadSettingReal(key, byref value)
ReadSettingInt(key, byref value)
settings_associator = "="
settings_comment = "#"
settings_backup = ".bak"