Bug 7571 – No uniformity of array textual representation

Status
RESOLVED
Resolution
DUPLICATE
Severity
minor
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2012-02-24T05:07:00Z
Last change time
2012-04-01T15:05:44Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-02-24T05:07:07Z
I am not sure if this is a small bug or if this is "as designed". Close it if this is working as designed. D2 code: import std.stdio, std.conv, std.string; void main() { auto a = [1, 2, 3]; writeln(a); writefln("%s", a); writeln(text(a)); writeln(format("%s", a)); } The output given by DMD 2.059head: [1, 2, 3] [1, 2, 3] [1, 2, 3] [1,2,3] I think writefln("%s") and format("%s") should give the same output. So I think here format("%s") should add a space after the comma.
Comment #1 by smjg — 2012-04-01T15:05:44Z
*** This issue has been marked as a duplicate of issue 4532 ***