12-12-2012 10:33 PM
HI erveryone,
I am working with the Scan from String fuction, but I have a problem. The string that I have as input is "temp=32.2", so I am using the Scan function as follows:
But as output 1 I have "temp=32.2" and 0 in the output 2.
Does anyone have an idea of how to separate "temp" in output1 and 32.2 in output2?
Thanks for your help
Solved! Go to Solution.
12-12-2012 10:39 PM
Try a format of "%4s=%f"
12-12-2012 10:41 PM
Thank you for early answer, but, what happens if my string is size-variable? I mean for some readings I have temp=32.2 for others something like: voltage=122.1, current=12, or humd=51.2
12-12-2012 10:45 PM - edited 12-12-2012 10:46 PM
The you need to program around it, for example as follows. There are many ways to do this...
12-12-2012 10:47 PM
thank you
12-12-2012 11:27 PM
Just make a small change to your format string, easy to do when you construct the format string from the dialog in the right-click menu.
12-13-2012 12:07 AM - edited 12-13-2012 12:08 AM
he wants the leading string too, maybe....
12-13-2012 12:15 AM
@altenbach wrote:
he wants the leading string too, maybe....
That sits in the first output.