A Beginner's Guide to D/Conditions and Loops/Switch Statement

Basics
The switch statement can be found in almost every programming language, it's commonly used for checking multiple conditions. Syntax is identical as it is in C++ or Java. It has following form:

Here's some simple example:

And the result of our code:

Enter some command: /hello Hello!

Note break keyword after each case! If it's bypassed each case after it will be called. So here's console output of code without breaks:

Enter some command: /hello Hello! Bye! I don't know that command

As you may see, all cases after  were "called", this is useful if we want to call same statements in more that one case. Here's one more example: