Changes between Version 1 and Version 2 of CodeStyle


Ignore:
Timestamp:
11/19/16 10:25:58 (7 years ago)
Author:
Steffan Karger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeStyle

    v1 v2  
    2929
    3030   Open question:  should we also allow `//` for single-line comments now that we can write C99?
     31
     32= Line wrapping =
     33The maximum line length is 80 characters.  When lines exceed this length, wrap them using a double indent (ie 8 spaces) on the new line.  For example:
     34For example:
     35{{{#!c
     36void my_function(void)
     37{
     38    if (variable_with_artificially_long_name_1 != 0 &&
     39            variable_with_artificially_long_name_2 != 0)
     40    {
     41        return variable_with_artificially_long_name_1 +
     42                variable_with_artificially_long_name_2 +
     43                variable_with_artificially_long_name_3;
     44    }
     45}}}
     46
     47If you find yourself continuously exceeding the line limit, you might want to consider breaking up your function into smaller functions to reduce nesting.
    3148
    3249= Some additional secure coding style rules =