Summary: Problem with readf
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from 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?

Give x:


Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to