LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

formata string A%f

Solved!
Go to solution

Hi,

 

I am new to LabVIEW and this is kind of a basic question.

I am trying to understand a code and I am supposed to modify it to suite our application. So here, I've got 'Scan from String' and to its 'Format String' terminal. 'A%f'

 

Now I know what %f is..but I don't understand what 'A' stands for.

 

Thanks in advance!

0 Kudos
Message 1 of 4
(2,693 Views)

It appears that your program is looking for the literal string "A" before a floating-point number.

format.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 4
(2,690 Views)

hi jcarmody,

 

Thank you for such a quick response!

So in order to get say 8 digits and 3 after the decimal point, I should write '%8.3f' right?

 

Thanks in advance!

0 Kudos
Message 3 of 4
(2,680 Views)
Solution
Accepted by netra

@netra wrote:

hi @jcarmody,

 

Thank you for such a quick response!

So in order to get say 8 digits and 3 after the decimal point, I should write '%8.3f' right?

 

Thanks in advance!


You should probably use "%.3f".  The width is very specific.  So if you might not have exactly 8 characters in the number you will not get the right number.  Be sure to look in the help for the Format Specifier Syntax article.


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 4 of 4
(2,671 Views)