05-24-2013 02:01 AM
My string is like: ".... angle: 39.5 bla bla..." and stored in a buffer "Locals.rString".
I want to fetch "39.5" and convert it to double to store in "Locals.acıDegeri"
Thanks.
Solved! Go to Solution.
05-24-2013 02:32 AM
Put this in your statement step.
locals.str2=Mid(Locals.str,3,4),locals.num=Val(locals.str2)
Locals.str and locals.str2 are string type.
Locals.num is a number type
Locals.str has "sss49.2lll"
05-24-2013 02:49 AM
Mid(string, startIndex,<numChars>)
You wrote startIndex=3 but it is not 3, actually I also don't know what it is because my string contains information from rs232 channel.
But converting part is true I think.
Do you know a expression which fetches after ":" character?
05-24-2013 03:00 AM
locals.num1=Find(Locals.str,":")
Use find function to get the location of :
Then use the mid function to extract the value