auto limitation?

Namespace rswhite4 at googlemail.com
Tue Sep 11 11:10:49 PDT 2012


I have this code, but it works not as expected:
http://dpaste.dzfl.pl/6ce5b4dd

I get 0 instead of 42 if my type is Int.
My value is correct (as you can see) but "writeln" prints still 0 
instead of 42.
I think "auto" compiles first to float and cannot handle then 
integers.
Am I right? And could you explain me how this could work?


More information about the Digitalmars-d-learn mailing list