[Issue 12260] Improve error of std.stdio.readf when involving whitespace

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat May 9 02:30:34 PDT 2015


https://issues.dlang.org/show_bug.cgi?id=12260

Dave Akers <dave at dazoe.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dave at dazoe.net

--- Comment #1 from Dave Akers <dave at dazoe.net> ---
Current version of d 2.67.1 will skip the \n, for example the program...
------
void main()
{
    import std.stdio;
    int input;
    readf("%s", &input);
    readf("%s", &input);
}
------
Given the input...
------
1
2
------
Will emit the error...
------
std.conv.ConvException@/usr/include/dlang/dmd/std/conv.d(2013): Unexpected '2'
when converting from type LockingTextReader to type int
------

--


More information about the Digitalmars-d-bugs mailing list