Detecting inadvertent use of integer division
Walter Bright
newshound1 at digitalmars.com
Mon Dec 14 10:22:04 PST 2009
Don wrote:
> Integer expressions remain inexact until there's a cast.
>
> (It's very simple to implement, you just use the integer range code,
> adding an 'inexact' flag. Division sets the flag, casts clear the flag,
> everything else just propagates it if a unary operation, or ORs the two
> flags if a binary operation).
That sounds like a very good idea.
More information about the Digitalmars-d
mailing list