How to test if a double has no fraction part
Namal via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Sep 3 05:51:40 PDT 2015
Interesting, in contrary to C++ it saves the integral part in the
dummy variable. Doing this I noticed if I try to write a double
variable in the console it gives me only the integral part. I
only did it with writeln so far. How can I print out a double
variable with a precision of 2 for instance? I tried it with
writefln("%d", d)
It compiles but crashes.
More information about the Digitalmars-d-learn
mailing list