Changeset 1776


Ignore:
Timestamp:
Jun 12, 2014, 5:53:06 PM (11 years ago)
Author:
Steven Levine
Message:

Correct typos.
Add Disabling Code section.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CodingStyle.txt

    r619 r1776  
    4141  if (expr) statement;
    4242
    43   // If statment is long, split logically and use braces.
     43  // If statement is long, split logically and use braces.
    4444  if (expr) {
    4545    statement_part1...
     
    106106
    107107    BOOL is_ok;
    108  
    109   Local varibles can be short as long as meaning is clear.
     108
     109  Local variables can be short as long as meaning is clear.
    110110
    111111    BOOL ok;
     
    114114
    115115    USHORT maxcnt;
    116  
     116
    117117Spaces
    118118
     
    148148    return (0);
    149149
    150   Do not use superfluous parens when operator precedence with do the
     150  Do not use superfluous parens when operator precedence will do the
    151151  right thing.
    152152
     
    161161  Avoid nested ternary conditionals (i.e. ? :).  They are hard to read and
    162162  rarely generate better code than switch or if statement.
     163
     164Disabling code
     165
     166  When disabling multiple lines of code, prefer
     167
     168    #if 0
     169    #endif
     170
     171  to
     172
     173    /*
     174    */
     175
     176  comments or // comments.
     177
     178  When disabling multiple lines of code, it is acceptable to use // comments
     179  to disable a single line.  The // should be followed by a trailing space
     180
     181    // DbgMsg("here");
    163182
    164183Memory
Note: See TracChangeset for help on using the changeset viewer.