[Issue 9592] New: Justified Tuple printing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Feb 25 18:48:34 PST 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9592
Summary: Justified Tuple printing
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: minor
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-02-25 18:48:32 PST ---
import std.stdio: writeln, writefln;
import std.typecons: tuple;
void main() {
auto s = "hello";
writefln(">%40s<", s);
writefln(">%-40s<", s);
auto t = tuple("hello");
writefln(">%40s<", t);
writefln(">%-40s<", t);
}
dmd 2.063alpha prints:
> hello<
>hello <
>Tuple!(string)("hello")<
>Tuple!(string)("hello")<
But maybe it should print:
> hello<
>hello <
> Tuple!(string)("hello")<
>Tuple!(string)("hello") <
--------------------
Note: currently this code doesn't give an error, I don't know if this is
correct:
import std.stdio: writefln;
void main() {
auto s = "hello";
writefln(">%-s<", s);
}
It prints:
>hello<
--
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