Re: reading float number from textfile

Posted by Jonny on November 27, 20011

In Reply to reading float number from textfile posted by ani t88ip88 on November 16, 20011

: I have problem on reading float number from textfile.
: Example of data is:
: aaaa 2.13 0.55
: To read this, I take them as string variable, then for the last two I convert to float (StrToFloat), but it does not work. I got result as follows:
: aaaa 2. 13 0.
--------------------------------
1. There are 2 decimal points in your string, that's not a valid format I presume...
2. What is the float number that you expect from this example?
3. What do you mean by "the last two I convert"? Do you mean the last two "characters", ie "55" in your example? Or you mean something else?

Regards,
Jonny

Related articles

       

Follow Ups