43 lines
454 B
Markdown
43 lines
454 B
Markdown
# Coding standards
|
|
|
|
* 4 spaces are used for tabulation. No tabs are allowed.
|
|
* Unix line endings are used.
|
|
* Curlies are always explicitly written.
|
|
* No trailing whitespaces at the end of lines.
|
|
* Insert closing newline at the end of files.
|
|
|
|
## If
|
|
|
|
```
|
|
if (something) {
|
|
...
|
|
} else {
|
|
...
|
|
}
|
|
```
|
|
|
|
## for
|
|
|
|
```
|
|
for (uint8_t i; i<j; i++) {
|
|
...
|
|
}
|
|
```
|
|
|
|
## while
|
|
|
|
```
|
|
while (condition) {
|
|
...
|
|
}
|
|
```
|
|
|
|
## function
|
|
|
|
```
|
|
void do_this()
|
|
{
|
|
...
|
|
}
|
|
```
|