Thread overview
[Issue 6448] New: writef("%05d", BigInt) problem
Sep 02, 2011
Kenji Hara
Sep 07, 2011
Don
August 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6448

           Summary: writef("%05d", BigInt) problem
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2011-08-07 05:30:41 PDT ---
(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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 02, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6448


Kenji Hara <k.hara.pg@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-09-02 05:27:43 PDT ---
https://github.com/D-Programming-Language/phobos/pull/230

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 07, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6448


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug@yahoo.com.au
         Resolution|                            |FIXED


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2011-09-07 00:11:38 PDT ---
https://github.com/D-Programming-Language/phobos/commit/568b04658df684118d769f10cb1f4a9413e8c9e5

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------