Anonymous user
Conditional structures: Difference between revisions
→If
m (Added Kabap) |
(→If) |
||
Line 2,062:
</lang>
If allows a statement to be included ahead of the condition. This is commonly a short variable declaration, as in,
<lang go>if x := fetchSomething();
DoPos(x)
} else {
Line 2,068:
}</lang>
In this case the scope of x is limited to if statement.
===Switch===
Simple usage is,
|