stdout - autoflushing

Benji romanbeno273 at gmail.com
Tue Dec 3 09:12:20 PST 2013


Hello,
in order to have correctly displayed output (before reading 
something from stdin),
I must call stdout.flush().
Sometimes, it's really annoying, especially when it is necessarry 
to call it 10 times.

For example:
write("Enter some string: ");
stdout.flush();
string a = readln();
write("And again please: ");
stdout.flush();
string b = readln();
...

Is there any way to prevent this?


More information about the Digitalmars-d-learn mailing list