In the C Programming Language switch() is used in control loops. Usage:
switch(dataYouAreChecking) {
case WM_CREATE:
drawTheWindow();
break;
case WM_DESTROY:
destroyTheWindow();
break;
default:
doSomethingElse();
}
Very useful when checking conditional data.
untergeek: Thank you for the clarification. I forgot to mention the fact that the switch condition must resolve to type int.