If into a script occurs a division by 0, the result is an error, and that's ok
But if the division is a Double / 0, like CDbl(5)/0, the result is "inf", which could be difficult to handle because it's not an error, but the worst thing happens if you do CDbl(0)/0, the result is "-nan".
This "number"seems to be negative, but not at all. If you multiply a positive int and -nan it gives -4000000 (int) but if you do somthing like this
Code:
var res = Cdbl(0)/0; // this is -nan
if(res <0 || !res) print("yes"); endif
"yes" is never print.
It could be fixed by using CInt() if you don't need a double
Is this a bug or is it ok?