http://d.puremagic.com/issues/show_bug.cgi?id=5231
Summary: BigInt lacks a normal toString() Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: jmdavisp...@gmx.com --- Comment #0 from Jonathan M Davis <jmdavisp...@gmx.com> 2010-11-17 21:02:36 PST --- This program import std.bigint; import std.stdio; void main() { auto b = BigInt(42); writeln(b); } prints BigInt rather than 42. BigInt does not define a normal toString(). It looks like it declares a version of toString() which takes a delegate and format string in an attempt to have more control of what the string looks like. However, this is useless for cases where you need an actual toString() - particularly when functions which you have no control over call toString(). Normally, all types should define a toString() so that they can be printed, and BigInt doesn't do that. So, BigInt should declare a normal toString() - presumably one which prints out the BigInt in decimal form. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------