There seem to be some problems with floating point numbers on SMSQ/E
(2.98)

First of all, entering numbers between 2E308 and 9E308 crash Sbasic!
Eg

PRINT 2E308: rem Bang!

Numbers <  -9E308 and >9E308 get an Invalid syntax error, which is ok.
But, notice the range has changed!
SMSQ/E allows  -1E308 to +1E308  while the old JS did  +/-1E610, or
something(?)

Loading up old SuperBasic programs with out-of-range numbers
(according to SMSQ) generates a Mistake. Good! However, you
can Qload such a file without so much as a murmur of the catastrophy
about to ensue: The moment you access the line in any way.. you
guessed it!*  Not quite so good.

Ive no idea what happens when a compiled program like that hits SMSQ.

Some more testing has shown that overflow-handling under SBASIC doesnt
seem to work either! Eg the overflow is silently accepted; the error
is only reported on the following use of a float:

100 x=1e308
110 i=0
120 rep
130 i=i+1:print i
140 x=x+x::rem Should overflow immediately
150 endrep

This will first print 1, then stop with an overflow error on line 130
in round two! If you then try to print x..*

Can someone confirm that this is not just a local phenomenon, please.


Per

* Bang!


Reply via email to