docs: add coding style example

Add example of how to structure else-blocks following a multiline block.
This commit is contained in:
Anders Wenhaug
2021-06-24 10:06:40 +09:00
committed by Yu Watanabe
parent b905f3bbba
commit 4dbad977ff
+8
View File
@@ -69,6 +69,14 @@ layout: default
```
- Do not write `foo ()`, write `foo()`.
- `else` blocks should generally start on the same line as the closing `}`:
```c
if (foobar) {
find();
waldo();
} else
dont_find_waldo();
```
## Code Organization and Semantics