Why is 0/0
throwing Overflow error
in VBA, while in .Net languages it is simply a Division by 0
error?
E.g., in C#
https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/floating-point-division-operator
Besides the obvious differences in implementation of languages and the way VBA
handles division
, MS Doc link above expands on the reasons for overflow exception
, that if the operand data types are integer then it will throw Overflow exception
(Last statement below)
Alternatively there is \
division operator that checks the range for you and throws Division by zero
exception