|
|
%!s(int64=2) %!d(string=hai) anos | |
|---|---|---|
| .. | ||
| README.md | 93e7a37493 Start updating control flow design (#544) | %!s(int64=4) %!d(string=hai) anos |
| conditionals.md | 4e9e43a109 some issues in readme-file, replacing orange with apple (#2656) | %!s(int64=3) %!d(string=hai) anos |
| loops.md | 8d3d1b1233 Flesh out loops docs a little (#729) | %!s(int64=4) %!d(string=hai) anos |
| return.md | 84ea453161 Add semicolon to description of `return var;` statement. (#3131) | %!s(int64=2) %!d(string=hai) anos |
Blocks of statements are generally executed linearly. However, statements are the primary place where this flow of execution can be controlled.
Carbon's flow control statements are:
if and else provides conditional execution of
statements.return ends the flow of execution within a function,
returning it to the caller.