LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Decimal String to Number" vi converting DBLs as integers

"Decimal String To Number" is truncating a decimal string as an integer rather than a DBL: i.e., 4.50 is converted as 4. The "default" input is wired to a DBL, and the wire color (orange) indicates compatibility with DBL. The HELP example talks about this indirectly; it shows conversion as an integer with the "default" input as an integer; implication is that conversion should be as DBL with "default" wired as DBL.

0 Kudos
Message 1 of 3
(2,684 Views)
You need to use "Fract/Exp String To Number" to convert the string. "Decimal String to Number" always results in an Integer.
Message 2 of 3
(2,682 Views)
The name "Decimal String to Number" is misleading.  I was fooled by that at first too.  The term "decimal string" to me implies that it is a string with a decimal point in it, meaning a floating point number.  The name should be changed to "Integer String to Number"  or "Numeric String to Integer Number".  Also the "Fractional String to Number" is also misleading.  A fraction is such as 1/2 or 3/4.  It should be named "Numeric String to Floating Point Number" or something like that.
- tbob

Inventor of the WORM Global
0 Kudos
Message 3 of 3
(2,669 Views)