From 45667bda83c25e1d3e74a81e33760e12aeb97d54 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 16 Oct 2014 23:53:46 +0200 Subject: [PATCH] Additional coding style rule. --- CodingStandards.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CodingStandards.txt b/CodingStandards.txt index 79403af2f..53667ce01 100644 --- a/CodingStandards.txt +++ b/CodingStandards.txt @@ -1,7 +1,7 @@ 0. Formatting a. Use tabs for indentation! -- 1 tab is 4 spaces wide. +- tab stops are every 4 characters. - One indentation level -> exactly one byte (i.e. a tab character) in the source file. b. Line widths: - Don't worry about having lines of code > 80-char wide. @@ -11,8 +11,9 @@ d. Never place condition bodies on same line as condition. e. Space between first paren and keyword, but *not* following first paren or preceeding final paren. f. No spaces when fewer than intra-expression three parens together; when three or more, space according to clarity. g. No spaces for subscripting. -h. Space all other operators. -i. Braces, when used, always have their own lines and are at same indentation level as "parent" scope. +h. No space before ':' but one after it. +i. Space all other operators. +j. Braces, when used, always have their own lines and are at same indentation level as "parent" scope. (WRONG) if( a==b[ i ] ) { printf ("Hello\n"); }