Conditionals
- Braces are required
- There are no switch statements like in C / C++
If statement
if (expr) {
statements;
}
elsif (expr) {
statements;
}
else {
statements;
}
single-statement if (expr);
Unless statement
- Logical negation of an
ifstatement:if (!expr)
unless (expr) {
statements;
}
single-statement unless (expr);