Output of std.format for float difference between DMD and GDC
BoraxMan
rotflol2 at hotmail.com
Wed Dec 4 09:41:58 UTC 2019
I have noted that DMD and GDC provide a different output to the
following line of code.
writeln(format("$%-12,3.2f",66543.22));
DMD outputs
$66,543.22
GDC outputs
$66,543.22 ,
As you can see, GDC puts a superflous comma at the end. The goal
of this line is to convert a float to a monetary representation,
therefore DMD is what I want and GDC not.
The question is, is the line of code in error? If not, does this
mean there is a bug with GDC's libphobos?
Regards,
Dennis
More information about the D.gnu
mailing list