LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading integer INI file tag with a comment on the same line

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?

0 Kudos
Message 1 of 4
(2,911 Views)

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

0 Kudos
Message 2 of 4
(2,824 Views)

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.

0 Kudos
Message 3 of 4
(2,810 Views)

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.

0 Kudos
Message 4 of 4
(2,729 Views)