LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scan from string error 85

Solved!
Go to solution

I am having trouble using scan from string function. For some reason I can't separate the string from the number. I get error 85.

0 Kudos
Message 1 of 5
(4,471 Views)

We can't really diagnose the problem if we don't know what's going into it...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 5
(4,463 Views)

Appologies.

 

When input string is PID1234 I expect the following outputs:

String output = PID

Numeric output = 1234

 

Instead I get an error 85 

0 Kudos
Message 3 of 5
(4,456 Views)
Solution
Accepted by topic author drakkar

%s is going to grab everything, instead grab the non-digits followed by a number using this format string : %[^0-9]%d

Message 4 of 5
(4,448 Views)

Use "%[^0-9]%d" for your format string.  This will tell the first string output to stop when it finds a number.

 

EDIT: Well, better late than never...


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(4,442 Views)