[Issue 4656] New: stdio.readf does not ignore white space

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Aug 16 14:11:39 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4656

           Summary: stdio.readf does not ignore white space
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: acehreli at yahoo.com


--- Comment #0 from Ali Cehreli <acehreli at yahoo.com> 2010-08-16 14:11:35 PDT ---
This makes it very difficult to read values. We can't retire din.readf before
fixing this.

import std.stdio;

void main()
{
    int i, j;
    readf("%s", &i);
    readf("%s", &j);
}

Run the program and provide the following as input:

42 43

The program terminates with

std.conv.ConvError: std.conv(1070): Can't convert value
`LockingTextReader(File(807637C),  )' of type LockingTextReader to type int

The reason is the white space.

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


More information about the Digitalmars-d-bugs mailing list