Bug 3479 – writef/writefln: positional precision not working

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2009-11-06T07:56:00Z
Last change time
2015-10-27T09:18:04Z
Assigned to
andrei
Creator
andrei
See also
https://issues.dlang.org/show_bug.cgi?id=15227

Comments

Comment #0 by andrei — 2009-11-06T07:56:50Z
(credit due to Leandro Lucarella) import std.stdio; void main() { int hour = 1, min = 2, precision = 2, sec = 3; writef("%1$d:%2$.*3$d:%4$.*3$d\n", hour, min, precision, sec); } and it prints 1:002:003 But it should really print: 1:02:03
Comment #1 by andrei — 2011-06-05T15:58:15Z