STYLE: code block indentation edits and example
This commit is contained in:
parent
fbdf4f9c45
commit
9f2447ce94
12
STYLE
12
STYLE
@ -21,8 +21,16 @@
|
|||||||
|
|
||||||
return io;
|
return io;
|
||||||
|
|
||||||
3. Cases in switch statements and matches in match statements should be indented
|
3. Each block of code should be indented once more than the keyword which
|
||||||
one level
|
initiated the block:
|
||||||
|
|
||||||
|
switch (c) {
|
||||||
|
case 'e': mode |= EQUAL; break;
|
||||||
|
case 'g': mode |= GREATER; break;
|
||||||
|
case 'l': mode |= LESS; break;
|
||||||
|
default: return usage(s);
|
||||||
|
}
|
||||||
|
|
||||||
4. In C, spaces should be placed in control flow statements after the keyword
|
4. In C, spaces should be placed in control flow statements after the keyword
|
||||||
and before the opening brace:
|
and before the opening brace:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user