www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 10060] New: readf doesn't work with arrays

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10060

           Summary: readf doesn't work with arrays
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: code dawg.eu


--- Comment #0 from Martin Nowak <code dawg.eu> 2013-05-10 13:37:58 PDT ---
import std.stdio;

void main()
{
    int[] s1;
    readf("%(%d,%)", &s1);
}

----

Even though unformatRange works, this code fails to compile, because it can't
instantiate std.conv.parse!(int[]) with a LockingTextWriter.

https://github.com/D-Programming-Language/phobos/blob/2613bc8c3a7ad527ccdf58028765555392706ac9/std/format.d#L4043

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 10 2013
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=10060



--- Comment #1 from Martin Nowak <code dawg.eu> 2013-05-10 22:50:33 PDT ---
http://stackoverflow.com/questions/15987313/reading-an-array-of-elements-with-readf-in-d/16490650#16490650

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