FNX Basic and scientific notation of numbers ???

In this category you can exchange your programming questions and solutions.
Post Reply
Fazer
Posts: 30
Joined: Tue Apr 29, 2008 12:43 pm

FNX Basic and scientific notation of numbers ???

Post: # 214Post Fazer
Tue May 06, 2008 1:22 pm

I think that fnxBasic can not handle numbers in scientific notation (e.g.: 23e5) in input.
Otherwise it can give out numbers in this format !


First sample:

`================
` Begin of code
?DIM x as double
?x = 23.2*10^24
?showmessage str$(x)
` end of code
`================

This Program gives you the result "x=23.2E45" in scientific notation. That`s ok !



Second sample:

`================
` Begin of code
?DIM x as double
?x = 23.2E24
?showmessage str$(x)
` end of code
`================

This results in an error message:
"error:45 line n: E is not a valid operator".

Is there a possibility to work in FNXBasic with scientific notation ?


Thank you for answers!

Fazer

Post Reply