Divide By Zero handling

Kelly Burgess kellyb at montana.com
Fri Dec 18 13:03:34 EST 2020


Mike wrote "in v10, it is much more strict"  and "was a new $pref added ?"

Xavier wrote "I only get a message in the trace log."

It looks like $clib.$prefs.$reportcalculationerrors is the property that makes the difference.  It's in 10.1, but it's also in 8.1.7, so not new, but maybe the default value changed?

When true, a divide by zero stops and barks --   E108080: Divide by zero

When false, a 32bit integer divide by zero results in 2147483647, or 0x7FFFFFFF.  That's the maximum value of a 32bit signed integer.  No stopping, just the trace log entry saying "Error evaluating calculation: num1/num2     Divide by zero"

I don't know if an error handler would be called in both cases.

Kelly


More information about the omnisdev-en mailing list