09-08-2023, 07:43 PM
(09-08-2023, 06:06 PM)Dimster Wrote: Would this be a success trap for NAN. ...That won't work because NaN is "falsey", in an expression like that it turns into a false value. You could use this with `Int()` to turn NaN into zero and do some comparisons, but it would get pretty messy.
Not to repeat myself, but you can do it like this, it looks silly but it does work
```
a = 0
b = 0
ret = a / b
If ret <> ret Then
' NaN is the only value that does not equal itself
ret = 1
End If
Print ret
```