LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scan from string error

Solved!
Go to solution

when l test the function of scan from string. Why will have this error?

捕获.PNG

捕获.PNG

 

0 Kudos
Message 1 of 5
(2,109 Views)
Solution
Accepted by topic author zychocolate

Hi,

 

use %[^.]%[.jpg] as format of string, and it will work fine.

 

also refer this.

 

way1.JPG

 

--Amit

-
Amit
CLAD
Message 2 of 5
(2,084 Views)

That Error clearly telling where you did mistake. you gave wrong format. there is no syntax with "%s.jpg".

 

what you want to do?

Munna
0 Kudos
Message 3 of 5
(2,079 Views)

Thank you so much!

0 Kudos
Message 4 of 5
(2,063 Views)

The lesson here is that a %s does not know where to stop.  It will just take the rest of the string.  Using the %[^.] will grab a string up to a found period (not including the period).


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
0 Kudos
Message 5 of 5
(2,008 Views)