RFC: 6178739 - Formatter - Zero padding flag with zero width
brian.burkhalter at oracle.com
Wed Jun 26 17:31:28 UTC 2013
On Jun 26, 2013, at 9:37 AM, Joe Darcy wrote:
> Specifically, I was referred to how C handles "%0.4f\n".
On 6/24/2013 12:56 PM, Brian Burkhalter wrote:
> By way of comparison, this C code
> printf("%1.4f\n", 56789.456789F);
> printf("%0.4f\n", 56789.456789F);
> prints this output
^ ^ ^ ^ ^ ^ ^ ^
It looks like it interprets the "0" as zero width, ignoring it as a flag. This appears contrary to the description of width in :
"A leading zero in the width value is interpreted as the zero-padding flag mentioned above […]."
More information about the core-libs-dev