Note: This website is archived. For up-to-date information about D projects and development, please visit
Version 1 (modified by jcc7, 14 years ago)

Declaring Variables

Part of TutorialFundamentals

In order to store information within a D program, you must declare variables before they are used. The syntax is name_of_type identifier.

void main()
    int myInteger;
    double myDouble;
    bit myBit;
    char[] myString;