Readln function is activated before the writeln("test"): ----- import std.stdio; void main() { writeln("test"); string s = readln; writeln(s); } -----