Precedence Operator
5 * / % << >> & &^
4 + - | ^
- 3 == != < <= > >=
+ 3 == != < <= > >=
2 &&
1 ||
</pre>
x <= f()
^a >> b
f() || g()
-x == y+1 && <-chan_ptr > 0
+x == y+1 && <-chan_ptr > 0
</pre>
"If" statements specify the conditional execution of two branches
according to the value of a boolean expression. If the expression
evaluates to true, the "if" branch is executed, otherwise, if
-present, the "else" branch is executed. A missing condition
-is equivalent to <code>true</code>.
+present, the "else" branch is executed.
</p>
<pre class="ebnf">
-IfStmt = "if" [ SimpleStmt ";" ] [ Expression ] Block [ "else" Statement ] .
+IfStmt = "if" [ SimpleStmt ";" ] Expression Block [ "else" Statement ] .
</pre>
<pre>
-if x > 0 {
- return true;
+if x > max {
+ x = max
}
</pre>
<pre>
if x := f(); x < y {
return x
-} else if x > z {
+} else if x > z {
return z
} else {
return y