[Issue 3018] linefeed ignored after positional parameter in std.format
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 15 20:02:34 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3018
Glenn Haecker <ghaecker at idworld.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |INVALID
--- Comment #2 from Glenn Haecker <ghaecker at idworld.net> 2010-08-15 20:02:31 PDT ---
You'd think that sometime in the 15-month period since I first reported this
"bug" someone would say, "No, you're an idiot. It works just fine when used
correctly." Obviously, this is not a bug. My apologies.
--------------------------------------------------------------
// Demo code
string line1 = "line 1";
string line2 = "line 2";
string line3 = "line 3";
writeln("With explicit parameters... ok");
writefln(" %s\n %s\n %s\n %s\n %s", line1, line2, line3, line2, line1);
writeln("(complete)");
writeln("\nWith positional parameters... works fine.");
writefln(" %1$s\n %2$s\n %3$s\n %2$s\n %1$s", line1, line2, line3);
writeln("(complete)");
--------------------------------------------------------------
Output:
With explicit parameters... ok
line 1
line 2
line 3
line 2
line 1
(complete)
With positional parameters... works fine.
line 1
line 2
line 3
line 2
line 1
(complete)
--
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