Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.
Version 3 (modified by Andrej08, 9 years ago)
--

Get input from the user (uses readln)

Part of TutorialFundamentals

Description

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

Example

import std.stdio;

void main()
{
    writeln("What is your name?");

    string name;
    stdin.readln(name);

    writefln("Hello %s", name);
}