02-04-2013 09:04 AM
Is there any format specifier string for "Format into string", whereas the result is an I16 string?
My problem is when I use "%d" and the input string is 65535, the result string should be "-1".
Solved! Go to Solution.
02-04-2013 09:18 AM
Just convert to I16 first then scan to string
02-04-2013 09:18 AM - edited 02-04-2013 09:19 AM
Are you trying to get an integer out of an ASCII string (Scan from String) or turn an integer into a string (Format into String). You title and question seem to contradict each other.
Assuming you are trying to scan from string, it looks like you need to scan into a U16 and then use a conversion bullet to turn it into an I16.
02-04-2013 09:21 AM
The input of the function is a DBL...
02-04-2013 09:24 AM
@mitulatbati wrote:
The input of the function is a DBL...
Then use Jeff's code as an example of what to do. You just have a double input instead of a U32, U16, etc.
02-04-2013 09:32 AM
I did it... the result string is 32767 😞
02-04-2013 09:35 AM - edited 02-04-2013 09:52 AM
@crossrulz wrote:
@mitulatbati wrote:
The input of the function is a DBL...
Then use Jeff's code as an example of what to do. You just have a double input instead of a U32, U16, etc.
Actually you need two conversions
to do that from dbl (LabVIEW Minutea that might bite you some day: Float to int retains sign)
02-04-2013 09:35 AM
02-05-2013 02:29 AM
Hi,
there are some other solutions, in each case the result=-1: