LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug: Inifile read

Also, 0 or NaN, it'll still give error 19.
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 14
(837 Views)

I'm guessing that a keyword without anything to the right of the equals sign is considered an empty string because that is exactly what it is.  That is how you define an empty string.  Well, to be less ambiguous, you'd have beginning and end quotation marks with nothing in between, but since quotation marks are implied, nothing to the right of the equals sign is valid for empty string.  However, it is NOT valid for any kind of number.  IMHO it should throw an error 19.  After all, LabVIEW can't read your mind.  It sees a valid string entry so it assumes it's a string and that you are reading it incorrectly.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 12 of 14
(813 Views)

But by the same logic, shouldn't a missing parameter throw an error also? That's a bigger miss in the ini-file in my book. Yet in that case it simply uses the default, nice and quiet. I'll make a suggestion out of it.

You're fully correct in how it works and handles the missing parameter, as it is, in fact, just an empty string in this case.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 14
(786 Views)

@Yamaeda wrote:

But by the same logic, shouldn't a missing parameter throw an error also? That's a bigger miss in the ini-file in my book. Yet in that case it simply uses the default, nice and quiet. I'll make a suggestion out of it.

You're fully correct in how it works and handles the missing parameter, as it is, in fact, just an empty string in this case.

/Y


What I am saying is that it is NOT a missing parameter.  No parameter implies empty string.  So LabVIEW considers the ini file to be correct and your implementation incorrect - you specified the wrong datatype.  I'm not sure I want a computer to start guessing user intent for this.  As it stands, it does throw an error telling you something went wrong.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 14 of 14
(765 Views)