ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

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
(3,816 Views)
Solution
Accepted by 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
(3,791 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
(3,786 Views)

Thank you so much!

0 Kudos
Message 4 of 5
(3,770 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).



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
(3,715 Views)