literals

so so at so.do
Sun Mar 28 06:26:43 PDT 2010


On Sun, 28 Mar 2010 18:18:20 +0400, Fawzi Mohamed <fawzi at gmx.ch> wrote:

> how?

When you divide 1.0 / 5, compilers warns or implicitly converts "5" to a  
floating point type, am i wrong?
I told you what i want, remember "zero implicit cast"

> yes you can write a template that automatically "upconverts" to float,  
> but I don't think that is the correct thing for a default thing to do,  
> why do you alway want to have floats as result?

I don't always want float as result, but check the function again.
What happens there? "1.0 / m" which will result a floating point type,  
what code suggests is, that this type will be "T"

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/



More information about the Digitalmars-d mailing list