Note: This website is archived. For up-to-date information about D projects and development, please visit

Get input from the user (uses readln)

Part of TutorialFundamentals


Shows how you can ask the user for input during runtime.


import std.stdio;

void main()
	writefln("What is your name?");
	string name = readln();
	writefln("Hello ", name);