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

Using more than one function

Part of TutorialIntermediate

Description

This D program shows you how to use more than one function in D.

Example

import std.stdio;

void main()
{
    write("Input some text and press Enter: ");  
    auto input = readln();

    printInput(input);
}

void printInput(string input)
{
    writefln("Your input: %s", input);
}