News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

General Question

Started by Scott_Bro, September 01, 2021, 04:35:01 AM

Previous topic - Next topic

Scott_Bro

I seem to be confused about something.
Can anyone help?

How do I convert a string to float?

I see a string and it looks good. (floating-point) deceimal example: 0.005798   0.095668 ect,,,

as a sting that's kewl but...

as soon as I make it a float it nolonger looks the same.
I feel dumb. I missing something.

I want to be able to read in float value and they do as strings but
I want to store them as floats.

Weired aw? What am I not seeing?

Thanks
Scott_Bro

kevin


the Val#() function converts a string to a float

Scott_Bro

Thsnks!

It's just that sometimes floats confuse me because they look different sometimes.

Why? Maybe, Kevin can explain it better too me.

kevin

#3
  if you display or convert a float to string that's really big or small it'll be noted using exponents.  


  https://en.wikipedia.org/wiki/Single-precision_floating-point_format