From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,863 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
(2,838 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,833 Views)

Thank you so much!

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