std.format and floating point issue

codephantom me at noyb.com
Sun Oct 29 10:13:08 UTC 2017


Can anyone help me to understand why the format in the second 
writeln below, does not format the output with commas?

--------------------------------

void main()
{
     import std.stdio, std.format;

     writeln( format("%,.1f", 84543432.951172) ); // 84,543,433.0
     writeln( format("%,.0f", 84543432.951172) ); // 84543433

}

------------------------------


More information about the Digitalmars-d-learn mailing list