import std.stdio;
void main(){
int n;
while(readf("%d", &n)){
if(n == 11)
break;
writeln(n);
}
}
The first iteration works, and it prints n
, but after that readf()
never returns.
The documentation has only a single line explaining readf()
:
uint readf(A...)(in char[] format, A args);
Formatted read one line from stdin.
Am I do something wrong? or is there something wrong with readf()
? I just need to read numbers from the standard input.
using: DMD 2.054 64-bit