www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 2310] New: Inconsistent formatting of arrays in std.stdio.write() and std.conv.to!(string)()

reply d-bugmail puremagic.com writes:
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.


-- 
Aug 23 2008
next sibling parent d-bugmail puremagic.com writes:
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: -------
Oct 11 2009
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=2310


Andrei Alexandrescu <andrei metalanguage.com> changed:

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



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: -------
Sep 26 2010