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;
}