08-15-2013 10:31 AM
Hi,
I try to convert the string from array to DBL but I can not find the function
Can someone help me. you find attached my program
thank's,
Solved! Go to Solution.
08-15-2013 10:38 AM
Decimal string to number.
But, if those commas are actually separating the integers and decomals, you might have to change them to periods first (exercise left to the OP).
Cameron
08-15-2013 10:48 AM
Use "Fact/Exp String To Number". http://zone.ni.com/reference/en-XX/help/371361H-01/glang/fract_exp_string_to_number/
08-15-2013 10:56 AM
Whoops, you're right. I went through it quickly and didn't notice that Decimal string to number resulted in integers. My bad
.
Cameron
08-15-2013 11:31 AM
@camerond wrote:
Whoops, you're right. I went through it quickly and didn't notice that Decimal string to number resulted in integers. My bad
.
Cameron
I'd have to include this in the top ten list of most common misunderstandings in LabVIEW. Most people think of "decimal" as "a number with a decimal point," but LabVIEW (at least in this case) defines it as a "base 10 number." You know what? BOTH are correct. Unfortunately, that leads to mass confusion, as most people expect this function to elicit a number with a decimal point if needed.
So don't feel bad. 😉
08-15-2013 07:18 PM
Thank's you save my life![]()
08-16-2013 02:51 AM - edited 08-16-2013 02:52 AM
I'd have to include this in the top ten list of most common misunderstandings in LabVIEW. Most people think of "decimal" as "a number with a decimal point," but LabVIEW (at least in this case) defines it as a "base 10 number." You know what? BOTH are correct. Unfortunately, that leads to mass confusion, as most people expect this function to elicit a number with a decimal point if needed.
So don't feel bad. 😉
It should really be called "String to Integer", as it's not a base 10 number, but a base 2 number, if you want to get technical. 🙂
I guess it's to cater to the "non programmers" by calling it "to decimal". Integer is however a basic part of math (http://en.wikipedia.org/wiki/Number#Integers) and i assume all who use LV has a basic knowledge of that. 🙂
By the same logic "String to fract/exp" should be renamed "String to real".
/Y
08-16-2013 10:18 AM
"String to Float" would be my attempt at renaming that function Y
But older versions of LabVIEW were not 100% IEEE 754 compliant. I will not speculate on future versions although, changing a core data type would be unusual. So, I assume the primitive was named "String to fract/exp" to avoid confusion. (That didn't work perfectly, did it
)
08-16-2013 10:40 AM
@JÞB wrote:
"String to Float" would be my attempt at renaming that function Y
I was about to suggest that also, but noticed that they used the terms Integer and Real on the wiki link. Personally i prefer float. 🙂
/Y
08-16-2013 11:02 AM
@Yamaeda wrote:
@JÞB wrote:
"String to Float" would be my attempt at renaming that function Y
I was about to suggest that also, but noticed that they used the terms Integer and Real on the wiki link. Personally i prefer float. 🙂
/Y
"Real numbers" is a mathematical concept. Floating point representation is a computational standard. A huge difference! computers don't work with Real numbers. (Well not this one- there are analog computors but they don't work with any OS LabVIEW supports)