[Issue 5237] writefln doesn't respect Complex.toString

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 19 04:36:20 PST 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5237



--- Comment #6 from Lars T. Kyllingstad <bugzilla at kyllingen.net> 2010-11-19 04:35:04 PST ---
(In reply to comment #3)
> (In reply to comment #1)
> > Partial fix in svn 2183. This fixes the last 3 cases, not the first one.
> > It would be very straightforward to implement the first case, but we need to
> > think if it would really be a sensible design, since we'd be doing
> > atoi(itoa(atoi(original_string))).
> 
> Couln't that be easily solved by storing the full format string in FormatSpec?

One problem is of course when the user passes a non-immutable format string, as
in

  char[] fmt = "%s %s".dup;
  writefln(fmt, 1, 3.14);

Then each format specifier has to be dup-ed before being stored in FormatSpec.

-- 
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