1283 – writefln: formatter applies to following variable

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 1283 - writefln: formatter applies to following variable
Summary: writefln: formatter applies to following variable
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年06月22日 13:08 UTC by david
Modified: 2014年02月16日 15:23 UTC (History)
0 users

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description david 2007年06月22日 13:08:38 UTC
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 Walter Bright 2007年06月27日 20:56:13 UTC
Fixed dmd 2.001


AltStyle によって変換されたページ (->オリジナル) /