scientific notation?

Blitz3D Forums/Blitz3D Beginners Area/scientific notation?

Second Chance(Posted 2003) [#1]
I know blitz can calculate and display numbers like this:

7.75e-004

But can I enter them and assign them to variables?


FlameDuck(Posted 2003) [#2]
Why not just try? TBH, I don't think you can. You would have to A) have a float, and B) maybe convert from a string.


Koriolis(Posted 2003) [#3]
LOL
Second Chance: that meant "yes":
myfloat# = Input()


FlameDuck(Posted 2003) [#4]
I'm at achool. I don't have Blitz. I can't test it myself. So there. :o>

Besides, I thought he meant in code: ie myfloat#=1.5e-5.


Floyd(Posted 2003) [#5]
The compiler doesn't understand scientific notation.
But the runtime conversion from string to float does:

a# = "7.75e-004"

Last edited 2012


Koriolis(Posted 2003) [#6]
Oh so he meant "in the code"? Wasn't very clear then because he said "enter them" (which means do an Input for me).
BTW FlameDuck, if you're at school why are you surfing the web??? That's not very serious of you, how disapponted I am... :\


Second Chance(Posted 2003) [#7]
Your both right :) Both answers are extremely helpful, thanks.

*edit*
btw - the reason why I don't "just try things" as suggested, is because I'm deeply involved in developement right now. I don't have the time to keep stopping "just to try out things." So I keep my browser open while I'm working, and if I can't find something in the docs I write it here as it comes to me. Then I work on a different part of the program with the hopes that my question will be answered within a few minutes. Then I can get right back to what I was working on before. I hope I'm not annoying anyone by asking questions here. Believe me, when time is abundant I do all kinds of crazy "trying things out." But when I'm on a roll and heavily focused on a solution I can't afford to derail my train of thought. Thanks again guys :)


FlameDuck(Posted 2003) [#8]
BTW FlameDuck, if you're at school why are you surfing the web???
My name is FlameDuck, and I'm an addict. :o>