Formatstring in 'Scan from String' 
Author Message
 Formatstring in 'Scan from String'

Hi!
i try to format a string (example 4.241) to a number, which looks same
(4.241). I do that with Scan from string, but without any Formatstring
he returns 4,00.
I havent any idea how these Formatstrings work, can someone please
post me the correct string?

Thanks
Zwitsch



Fri, 29 Oct 2004 23:34:11 GMT  
 Formatstring in 'Scan from String'
Your system is set to use the comma as decimal separator and the the
scan stops at the point in "4.241" giving 4,00. Set the format string
to specify the decimal separator e.g. "%.;%f"


Sat, 30 Oct 2004 00:49:25 GMT  
 Formatstring in 'Scan from String'
Zwitsch,

There is some help for the format string, it's just a bit hard to
find, if memory serves.  I just looked, and it's very obscure indeed.
You have to go to the labview user manual, which you can get to by
going to the help from anything that uses a format string (I used "to
Spreadsheet String").  You will get a link to the User Manual (PDF).
The information is somewhere in Chapter 9, but the help file doesn't
give really good instructions on finding the information in Chapter
nine.

The useage of the format string is actually pretty simple.  Once you
learn the rules, you won't have any trouble.

Good luck.



Sat, 30 Oct 2004 02:25:07 GMT  
 Formatstring in 'Scan from String'
Thanks a lot! It works perfectly!
Zwitsch


Sat, 30 Oct 2004 21:24:04 GMT  
 Formatstring in 'Scan from String'
Labview uses standard ANSI "C" (programming language) format strings
in Scan From String etc.  It also uses a subset of Regular Expression
pattern matching in the Match Pattern string function.  Any standard C
programming reference will give you lots of examples of format
strings.  GH


Sun, 31 Oct 2004 23:00:08 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. number's to string -) tcp-ip -) scan from string problem

2. STRING 'make'/'remake'

3. Getting Ascii string from hex 'string'

4. problem with Tcl 'scan'

5. POLL: New 'clock scan' formats

6. 'make test' bombs in scan.test

7. Nobrainer concerning 'scan' command

8. TIP #188: Add 'string is wide' to the 'string is' Subcommand

9. Error in 'string toupper' and 'string tolower'

10. finding '(' in string with gawk

11. Using '&' in the herald string

12. ENTRY's and STRING's and a locator

 

 
Powered by phpBB® Forum Software