integer division with float result
Stas Sergeev
stsp at aknet.ru
Mon Nov 19 03:36:25 PST 2007
Bill Baxter Wrote:
> > Of course, but there is no problem to make the / op to
> > just always return float, or is there?
> Which flavor of division is being used here?
> void do_something(int x) { ... }
> void do_something(float x) { ... }
> do_something(a/b);
Well, in case / is made to return float, then the simplest
answer might be that it should use do_something(float x).
But my statement about the compatibility was wrong
of course...
More information about the Digitalmars-d
mailing list