[Issue 2310] New: Inconsistent formatting of arrays in std.stdio.write() and std.conv.to!(string)()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 23 15:22:42 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2310
Summary: Inconsistent formatting of arrays in std.stdio.write()
and std.conv.to!(string)()
Product: D
Version: 2.018
Platform: PC
OS/Version: Windows
Status: NEW
Severity: trivial
Priority: P2
Component: Phobos
AssignedTo: bugzilla at digitalmars.com
ReportedBy: snake.scaly at gmail.com
The documentation for std.stdio.write() says: "... for each argument ... format
the argument (as per to!(string)(arg)) ...". Nevertheless, arrays are
formatted differently when using std.stdio.write() and std.conv.to!(string)():
import std.stdio;
import std.conv;
void main() {
writeln([1,2,3]); // prints [1 2 3]
writeln(to!(string)([1,2,3])); // prints [1,2,3]
}
I expect the formatting to be identical.
--
More information about the Digitalmars-d-bugs
mailing list