D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6448 - writef("%05d", BigInt) problem
Summary: writef("%05d", BigInt) problem
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-08-07 05:30 UTC by bearophile_hugs
Modified: 2011-09-07 00:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-08-07 05:30:41 UTC
(Maybe I have already filed this bug). D2 code:


import std.stdio, std.bigint;
void main() {
    int x = 100;
    writefln("%010d", x);
    BigInt bx = x;
    writefln("%010d", bx);
}


DMD 2.054 gives a wrong output:

0000000100
100