Le 3 août 08 à 21:08 (soir), Tim Jones a écrit:
On Aug 3, 2008, at 11:30 AM, Harrie Westphal wrote:
The problem is that RB gives you a number that can be used in
subsequent calculations. Hence, they are violating the
consequences of a zero divide. The floating points, Single and
Doubles at least print INF if displayed on the screen or paper,
but even those do not stop you from doing further calculations.
Just everything calculated from them, that stays a Single or Float
will print INF, I believe. However, move the Double to an Int64
and you again have no indication of a problem.
While I enjoy discourse on topics like this (and I really like
Fargo's note about drag chutes - hope the NHTSA doesn't see it or
we'll get mandatory drag chutes in 2015...), all our chatter won't
make much difference if we don't actually request a change.
We're now up to 39 messages on this and I don't see any mention of
a bug report or feature request.
I also agree with Harrie in that the inconsistent manner in which
RB handles this scenario between types needs to be fixed.
Therefore, I've submitted a bug report based on Harrie's succinct
note above.
FogBugz ID 4623 - Inconsistent numeric type value handling of
divide by zero scenario
So what do you expect to happen by dividing by 0?
As other stated, dividing by zero does not make your app crashing
(the computer supports doing so), so an exception is irrelevant to
that case. And your resulting integer has to be something.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
|