08-20-2004 07:37 PM
08-20-2004 09:06 PM
08-21-2004 03:22 AM
06-21-2006 10:54 AM
I have a simular problem that I have been working on for a couple days. I have a string that looks like this
+7.50000000E+01 F,101,+7.50000000E+01 F,102,+7.50000000E+01 F,103,+7.50000000E+01 VDC,104
I want to search the string for a channel number (i.e. 102 ect.) an parse the reading (+7.50000000E+01 F) less the (F) convert from fract/exp string to number and place it into a 1D array. I have tied the example "extract numbers.vi" and was able to get all the number out of the string but it did't preserve the exp values i.e. it read 7.5 instead of 75.
I'm greatful for any help,
jb112454
06-21-2006 12:16 PM
06-22-2006 08:02 AM
07-05-2012 11:59 AM
Hi
I'm trying to parse a string and seperate it into
String
Number
String
The only problem is that the output is not delimited by a special character (, ; : ! - _ or anything of the sort).
An example would be
B43F
whereas another example would be J
I could also have 102443H
and so on...
The amount of chars is random so is the offset. So basically, is there a function that can scan a string and differrentiate a number from a string.
I've tried the scan function
e.g
B43F
With Scan function and %s I guess, B43F
e.g
43F with Scan function and (double) I get 43 and F. This works!
Thanks again!
07-05-2012 02:45 PM - edited 07-05-2012 02:53 PM
Use %[^0-9]%d%s for your format. The %[^0-9] takes a string up until, but not including, a decimal character.
07-05-2012 02:48 PM
Thanks.
I'll try that!
I was reading up on those format strings but couldn't quite understnad how to use it.