Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readf doesn't work with arrays #9973

Open
dlangBugzillaToGithub opened this issue May 10, 2013 · 2 comments
Open

readf doesn't work with arrays #9973

dlangBugzillaToGithub opened this issue May 10, 2013 · 2 comments

Comments

@dlangBugzillaToGithub
Copy link

code (@MartinNowak) reported this on 2013-05-10T13:37:58Z

Transfered from https://issues.dlang.org/show_bug.cgi?id=10060

CC List

  • alex.jercaianu

Description

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
@dlangBugzillaToGithub
Copy link
Author

code (@MartinNowak) commented on 2013-05-10T22:50:33Z

http://stackoverflow.com/questions/15987313/reading-an-array-of-elements-with-readf-in-d/16490650#16490650

@jdougan
Copy link
Contributor

jdougan commented Dec 4, 2024

No wonder I can't find any real examples of compound specifier use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants