getting integer from string. 
Author Message
 getting integer from string.

i would like to ask, if i read a string from a device, and the string
consist of integer and letter, for example: P= 6.13 dB rel
but i only want to get 6.13 from this output STRING
can i do that? and how?

thanks a lot!!!



Sun, 12 Dec 2004 16:56:27 GMT  
 getting integer from string.
Crystal meinte am 26.06.2002 10:56:

Quote:
> i would like to ask, if i read a string from a device, and the string
> consist of integer and letter, for example: P= 6.13 dB rel
> but i only want to get 6.13 from this output STRING

Try following format string for the function "scan from string":

"P= %f dB rel"
"P= %f" (should also run)

greets

--
Henrik Skupin



Sun, 12 Dec 2004 17:49:53 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help - Converting gets string to integer

2. convert integer string to date string

3. Getting Ascii string from hex 'string'

4. I/O gets and integers

5. Getting the integer part of a real

6. printing and getting integers in assmbler

7. Long integers getting short shrift?

8. HELP: Tcl command for getting integer value of character

9. Help required translating strings to integer arrays

10. Converting a number in a String character to an Integer

11. Integer to Binary String

12. String to Integer

 

 
Powered by phpBB® Forum Software