02-25-2014 12:54 AM
Hey guys i have been trying to convert gps string into an integer, like this
String coming is 2467.8976 and i need to convert it into an integer similar like this 2467.8979 so that i can shift the decimal point to the left (24.678979) which i coudnt do with the string. Its just been my 2 weeks with the labview so be kind. Thankyou
Solved! Go to Solution.
02-25-2014 12:57 AM - edited 02-25-2014 12:58 AM
Hi Awais07,
You can use "Scan from String" function (use quick drop to search for the item). It should change the string to integer.
Once converted to integer, I'm sure you'll know how to do the rest.
Scan from String:
http://zone.ni.com/reference/en-XX/help/371361H-01/glang/scan_from_string/
Warmest regards,
Lennard.C
02-25-2014 01:12 AM
Thanks for your response, Lennard.
I have used "scan from string" and the input string lets suppose is 2467.8989, ouput coming from scan from string is 2467.9 (rounded off?). I have used %f for formatting. I want the whole string, kindly help.
02-25-2014 01:34 AM
Hi Awais07,
Once you created an indicator for the output of the Scan from String, right click on that indicator >> Display Format... >> Increase the value of the Digit to 9
Regards,
Lennard.C
02-25-2014 01:41 AM
Thanks lennard for providing me the best solution. I then divided the integer with 100 and got the desired result. Thank you again.