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

           Summary: Problem with readf
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-08-25 02:53:20 PDT ---
import std.stdio: readf, writef, writeln;
void main() {
    int x = 5;
    writef("Give x: ");
    readf("%d\n", &x);
    writeln("\nx: ", x);
}


If there is no input (because that program is called by another one), readf
leaves x unchanged and doesn't raise an exception. I think this is not good.

-------------

Another problem: on Windows if you run that program from the console, and you
just hit enter, you are allowed to keep giving lines. Is this by design?

...>test
Give x:

555
123
155

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

Reply via email to