This program below fails if the file contains an empty line.
Why exactly does this happen?
Does ln get a mangled value when a line is empty?


    import std.format;
    import std.stdio;

    void main()
    {
        int[] test;

        foreach (ln; File("ints.txt").byLine)
            formattedRead(ln, "%(%d %)", &test);

        writefln("%(%d %)", test);
    }


std.conv.ConvException@c:\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1779): Unexpected '
' when converting from type char[] to type int
----------------
4169C4
41684F
405E63
405BDF
405A06
405964
40573F
4055CE
40246B
4020CC
4083A0
4083DA
407FFB
41DB21
----------------


Reply via email to