[Issue 5970] New: format("%d", BigInt) problem
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 9 15:31:21 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5970
Summary: format("%d", BigInt) problem
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2011-05-09 15:27:23 PDT ---
This is in reply to comment #3 of bug 5765
> > How do I perform the equivalent of str(ackermann(4, 2)) with BigInt?
>
> format("%d", ackermann(4,2))
I think it doesn't work with DMD 2.053beta:
import std.bigint, std.string;
void main() {
format("%d", BigInt(1));
}
It prints:
std.format.FormatError: std.format Can't convert std.bigint.BigInt to string:
"string toString()" not defined
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list