Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #249 (closed defect: fixed)

Opened 13 years ago

Last modified 12 years ago

Format: multiple floating point arguments causes duplication

Reported by: Deewiant Assigned to: kris
Priority: major Milestone: 0.96 Beta 2
Component: IO Version:
Keywords: Cc:

Description

import tango.io.Stdout;

void main() {
	Stdout.formatln("{0:d} {0:d} {0:d}", 1);
	Stdout.formatln("{0:f} {0:f} {0:f}", 1);
}

The first call outputs "1 1 1" while the second outputs "1.00 1.001.00 1.001.001.00".

Change History

02/02/07 17:43:16 changed by kris

  • status changed from new to assigned.

lol - that's pretty cool :)

Thanks for catching it, Deewiant

02/02/07 18:27:02 changed by Deewiant

  • summary changed from Format: repeating floating point arguments causes duplication to Format: multiple floating point arguments causes duplication.

Not a problem. I checked a bit more, and it's not about repeating arguments:

import tango.io.Stdout;

void main() {
	Stdout.formatln("{0:d} {1:d} {2:d}", 1, 2, 3);
	Stdout.formatln("{0:f} {1:f} {2:f}", 1, 2, 3);
}

Outputs "1 2 3" followed by "1.00 1.002.00 1.002.003.00".

02/02/07 19:25:49 changed by kris

Yeah, it looks like the format buffer is not being cleared properly :)

02/11/07 00:34:17 changed by kris

  • status changed from assigned to closed.
  • resolution set to fixed.
  • milestone set to 0.96 Beta 2.

Fixed

07/11/07 18:46:45 changed by brad

testing email notification to Deewiant

07/11/07 19:12:40 changed by brad

sorry Kris, still testing for Deewiant

07/11/07 19:20:15 changed by brad

#3