Page 1 of 1

Floats require a 0.?

Posted: Mon Jul 26, 2004 4:06 pm
by Krylar
Hiya,

Noticed something odd, but maybe it's just not what I'm used to. If I try to add .5 to something I get an error. However, if I try to add 0.5 it works okay.

Example:

Code: Select all

  Value.f = Random(1) + .5
That will bomb in the compiler, but:

Code: Select all

  Value.f = Random(1) + 0.5
...seems to work just fine.

So the 0. has to be there, it seems...or am I doing something wrong?

Thanks!

-Krylar

Posted: Mon Jul 26, 2004 5:24 pm
by merendo
You're right, seems Fred has to fix this as soon he's back from holiday.

My calculator accepts this without problems:

.1 [=}

0.1 appears on the display. :wink:

Posted: Mon Jul 26, 2004 5:54 pm
by ivory
This has been reported already. Apparently, there are only a few of us who enter decimal fractions without the leading zero, (so it was by design not by oversight), however, I got the feeling that Fred would add this in, time permitting.