私は d を学ぼうとしているので、hello world から始めて、少し拡張しようとしました。
import std.stdio;
import core.thread;
void main(string[] args){
writeln("Hello World!");
Thread.sleep(dur!("seconds")(5));
writeln("Press enter key to exit...");
writeln(readln());
}
だから私は私の出力が次のようになることを期待しています
Hello World!
Press enter key to exit...
//input "abcd"
abcd
しかし、代わりに私はこれを得る
//input "abcd"
Hello World!
Press enter key to exit....
abcd
スリープ機能もスキップされます。何が起こっている?