http://d.puremagic.com/issues/show_bug.cgi?id=4762
Summary: Textual representation of struct that doesn't define toString() Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-08-29 15:57:55 PDT --- This D2 program: import std.stdio: writeln; struct Foo { int x; string s; } void main() { Foo f = Foo(1.5, "hello"); writeln(f); } With DMD 2.048 it prints: Foo When a struct doesn't define a toString() I'd like (mostly for debugging purposes) writeln/format to create a bit better textual representation, for example it may show fields values: Foo(x=1.5, s="hello") See also bug 3813 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------