If/Else

Part of TutorialFundamentals

Description

Simple (yet effective) flow control.

Example

import std.stdio;

void main() {
  int i;
  if (i == 0)
    writef("It's one!");
  else
    writef("It's not one!");
}