10-29-2019 11:04 AM
I am trying to read data from a tag using Ini_GetInt () function. The tag data has a comment after it and it cannot be read. The default Ini_SetTokens() settings indicates a semicolon is a comment.
BoardID = 48 ; 0x30 - returns a zero
BoardID = 48 - returns a 48
any suggestions?
11-07-2019 03:37 AM
I think comments are only supported in their own lines, not after a tag-value pair. But the source code for the Ini functions is supplied with CVI (toolbox), it's easy enough to debug it yourself or even alter it to suit your needs.
HTH, Marcel
11-07-2019 05:27 AM
I read everything in as a raw string and test for comments before I convert them into the correct data types. It would be nice if this was built in to the function.
12-11-2019 03:12 AM
The ini format has never been 'official' and there are many libraries that read/write to it in different ways, particularly regarding comments. I sometimes use MinINI (or others) instead of the one that comes with CVI, when I have problems like that.