sVeNvAeTh Posted September 25, 2007 Report Share Posted September 25, 2007 I have to convert a string in a DBL. That is no problem, but the string uses decimal power, like 1.54 E+02. Now, I get the right value, but it only shows 1.54 and not the decimal power. What is the mistake? Quote Link to comment
Donald Posted September 25, 2007 Report Share Posted September 25, 2007 QUOTE(sVeNvAeTh @ Sep 24 2007, 10:54 AM) I have to convert a string in a DBL. That is no problem, but the string uses decimal power, like 1.54 E+02. Now, I get the right value, but it only shows 1.54 and not the decimal power. What is the mistake? The white space before the exponent is the problem... LabVIEW needs 1.54E+02. There are numerous ways of solving this. You could for example use "search and replace string " and replace '/sE+' by 'E+'. Quote Link to comment
sVeNvAeTh Posted September 25, 2007 Author Report Share Posted September 25, 2007 i tried it, but it doesnt work. i still see the space between 1.54 and E+01. i insert a search an replace string and on left i put in the result string, the '/sE+' and the 'E+'. Quote Link to comment
Mellroth Posted September 25, 2007 Report Share Posted September 25, 2007 QUOTE(sVeNvAeTh @ Sep 24 2007, 01:11 PM) i tried it, but it doesnt work. i still see the space between 1.54 and E+01.i insert a search an replace string and on left i put in the result string, the '/sE+' and the 'E+'. Try searching for " ", and replace this with "" (without the qoutes). The search string "\s" (notice backslash), is the \-code view of a space character (To view any string in LabVIEW as \-code, right click on the string and select "\"-codes display) You should also wire the "Replace All" terminal with a TRUE constant, to get rid of all spaces. Good luck /J Quote Link to comment
sVeNvAeTh Posted September 25, 2007 Author Report Share Posted September 25, 2007 Cool, that s what I need Many thanks!!! It works... Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.