[Issue 1283] New: writefln: formatter applies to following variable

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 22 11:08:40 PDT 2007


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

           Summary: writefln: formatter applies to following  variable
           Product: D
           Version: 1.016
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: tazz at gmx.at


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.


-- 



More information about the Digitalmars-d-bugs mailing list