Bug 1283 – writefln: formatter applies to following variable

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2007-06-22T13:08:00Z
Last change time
2014-02-16T15:23:52Z
Assigned to
bugzilla
Creator
tazz

Comments

Comment #0 by tazz — 2007-06-22T13:08:38Z
Using a formatter ("%14d") in writefln, the "14" applies not only to the original variable but to the next as well. writefln(">%14d<, ", 15, [1,2,3]); OUTPUT: > 15<, [ 1, 2, 3] INSTEAD OF: > 15<, [1,2,3] The specs (http://digitalmars.com/d/1.0/phobos/std_format.html#format-string) don't tell me this behaviour is to be expected, if I'm wrong please correct me.
Comment #1 by bugzilla — 2007-06-27T20:56:13Z
Fixed dmd 2.001