These include if, for, while, switch, etc. Here is an example if statement, since it is the most complicated form:
if ((condition1) || (condition2)) { action1; } elseif ((condition3) && (condition4)) { action2; } else { defaultaction; }
Control statements shall have one space between the control keyword and opening parenthesis, to distinguish them from function calls.
You should use curly braces even in situations where they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added.
For switch statements:
switch (condition) { case 1: { action1; break; } case 2: { action2; break; } default: { defaultaction; break; } }