I am trying to use a multi line value as specified as list in ini file, I was able to read sections but not able read to multi line values from a given key.
I have tried to using list manner it completely failed.
# Ini file
[UNITS]
COMPARE_UNITS = [list
[11871000 118700]
[1198100 1198100]
]
[VARS]
OLD_REL = 4.3
NEW_REL = 4.5
I have tried to using string based format also i failed but i could able to read sections and first line of a given key value.
# Ini file
[UNITS]
COMPARE_UNITS = "
11871000 118700
1198100 1198100
"
[VARS]
OLD_REL = 4.3
NEW_REL = 4.5
When i tried to get key values it returns only first line
% set fileOrg [ini::open "sample.ini" r]
ini11
% foreach sec [ini::sections $fileOrg] {puts [::ini::get $fileOrg $sec]}
NEW_REL 4.5 OLD_REL 4.3
COMPARE_UNITS {1198100 1198100}
%
I have two question
- How to read a multi value form a given key using package inifile
- Can i specify a list values in a key?
-Malli