Simple VS console app in D. Reading lines to a string variable interactively. Object is to have no extra blank lines in the console output. Seems very broken for this use, requiring two extra "enter" entries before the outputs both appear. Version DMD32 D Compiler v2.069.2

import std.stdio;

int main(string[] argv)
{
 string nm;
 stdin.readf("%s\n",&nm);
 writeln("nm:",nm);
 stdin.readf("%s\n",&nm);
 writeln("nm:",nm);
 return 0;
}

======== io shown below
123
456
nm:123

nm:456

Reply via email to