Interesting little bug this one! =D
If you run the following code, the last call to INTEGER (i.e. INTEGER(1) ) returns 0.
FOR i = 0 TO 1 STEP .1
PRINT i + " - "+INTEGER(i), 0, i*200
PRINT INTEGER(1),100,100
NEXT
SHOWSCREEN
MOUSEWAIT
Yet if you run
PRINT INTEGER(1),100,100
PRINT INTEGER(1.0),100,120
SHOWSCREEN
MOUSEWAIT
they both return 1 correctly. Just in case anyone gets a wierd result with one of these, I thought I got it to print 0 for INTEGER (1.0) originally but it doesn't print that when I run it now.
This is probably the usual floating point error that if you add .1 to a variable it doesn't add upp at EXACTLY 1 but 0.9999999999999 something and then INTEGER() will cut it down to 0. If you call INTEGER(1) it correctly returns 1.
Bingo Moru.
Thanks! I'd forgotten about that bug!
no bug! It's a feature of the CPU.