In ini (configuration) files it is desirable to commentout keys as well as add comments to Sections or Keys, thsi can be done with
;this is a comment
Why is there not functions for adding comments to an ini file
The functions I would like is
- Add comment to section/Key (if key is blank, the comments are added below the [section] tag)
I want this so that I can keep track of what the sections and keys are used for in a complex application or for putting notes into an ini (ie ;do not change this filed or ;valid values are 0-100)
The only method I see for this is to parse and write the comments manually of using a text file section.
When I looked into the low level format of the ini files it is just a queue of clusters which keeps track of sections and key-value pairs, there is a comment filed but I dont see it ever used, was this a planned option that was never implemented. I do not want to write my own since this now requires access to provate functions of the config libraray and I have been burned by this already (NI decides to make a function private and future code is broken).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.