[Issue 9357] Floating-point literal should always be printed with a period
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 20 10:19:18 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9357
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #2 from bearophile_hugs at eml.cc 2013-01-20 10:19:17 PST ---
Is this enhancement request only about error messages?
This prints "1":
import std.stdio: writeln;
void main() {
double x = 1.0;
writeln(x);
}
While in Python it always prints the leading ".0":
>>> x = 1.0
>>> x
1.0
I'd like writeln() to do the same. It helps tell part FP from integral values
in printouts, etc.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list