Why doesnt this raise an error

I don’t seem to be able to generate a divide by zero error. I was just trying this as I wanted to see how my app could cope with different errors. I have tried a number of variations, still no error…

dim i as Double
dim j as integer
i= 1.0/0.0
j=1.0/0.0

Right, no error. If you check the value of i and j, you will find that their value is set to “inf”, a valid value for a double.

See http://documentation.xojo.com/index.php/Double

Ah ha, Thanks! I should read all the documentation.

If you do, you’ll be the only one. :slight_smile:

In MBS Plugins we also have helper functions to detect this: IsInfMBS and IsNANMBS.