Thread overview
[Issue 6627] New: BigInt textual representation
Sep 08, 2011
Kenji Hara
September 08, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6627

           Summary: BigInt textual representation
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody@puremagic.com
        ReportedBy: bearophile_hugs@eml.cc


--- Comment #0 from bearophile_hugs@eml.cc 2011-09-08 14:02:51 PDT ---
This is more than an enhancement request because I think this is a basic need.

With dmd 2.055 this code doesn't compile, but I hope it will eventually work:


import std.bigint, std.string, std.conv;
void main() {
    auto s1 = text(BigInt(1));
    auto s2 = format("%s", BigInt(1));
    auto s3 = format("%d", BigInt(1));
}

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



--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2011-09-08 14:24:37 PDT ---
I have posted two pull requests.

https://github.com/D-Programming-Language/phobos/pull/236
to!SomeString should use formatValue. After that, std.conv.text() using to!()
will support BigInt implicitly.

https://github.com/D-Programming-Language/phobos/pull/231
Issue 6595 - std.string.format() and sformat() are obsolete
std.string.format() and sformat() are now uses std.format.doFormat(), but it is
obsolute function. After that, the two functions uses formatValue, and will
support BigInt implicitly.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 12, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6627


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from bearophile_hugs@eml.cc 2012-12-11 19:25:24 PST ---
Fixed time ago.

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