Thread overview
[Issue 2310] New: Inconsistent formatting of arrays in std.stdio.write() and std.conv.to!(string)()
Aug 23, 2008
d-bugmail
August 23, 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@digitalmars.com
        ReportedBy: snake.scaly@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.


-- 

October 11, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2310


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |andrei@metalanguage.com
         AssignedTo|nobody@puremagic.com        |andrei@metalanguage.com


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 26, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2310


Andrei Alexandrescu <andrei@metalanguage.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


--- Comment #1 from Andrei Alexandrescu <andrei@metalanguage.com> 2010-09-26 11:28:09 PDT ---
Resolved by using a ", " separator by default in to!string.

http://www.dsource.org/projects/phobos/changeset/2052

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------