1 |
if(some boolean expression) { .. }
|
2 |
else if(another boolean) { .. }
|
3 |
else { ... }
|
4 |
while(any boolean) { /* Do Stuff */ }
|
5 |
do { /* What to do */ } while(another boolean);
|
6 |
for(expression1; booleanexpression ; expression2) { ...}
-
naturally starts with expression1, applies expression2 at end of each loop, and continues as long as booleanexpression true
|
7 |
switch (expression) { /* Just as in C */
|
8 |
case Constant1: /* Do following if expression=Constant1 */
|
9 |
/* Bunch of Stuff */
|
10 |
break;
|
11 |
case Constant2: /* Do following if expression=Constant2 */
|
12 |
/* Bunch of Stuff */
|
13 |
break; /* ....... */
|
14 |
default:
|
15 |
/* Bunch of Stuff */
|
16 |
break;
|
17 |
}
|