Changes between Version 4 and Version 5 of coding_rules
- Timestamp:
- 06/20/11 11:48:44 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
coding_rules
v4 v5 2 2 == General guidelines == 3 3 4 - comment your code extensively(everybody must understand what is being done)4 - comment your code (everybody must understand what is being done) 5 5 - NEVER more than one blank line please! 6 - Align operators vertically to emphasize local program structure and semantics when possible 7 - Do not use excessive blank spaces (especially in equations) 6 8 7 9 == C/C++ == … … 15 17 for(int i=0<i<n;i++) A[i]=i; 16 18 19 for(int i=0<i<n;i++){ 20 A[i]=B[i]; 21 B[i]=0; 22 } 23 17 24 if(a==0) bool=true; 25 26 if(a==0) 27 bool=true; 28 else if(a==1) 29 bool=flase; 30 else 31 _error_("a=%g not supported",a); 18 32 19 33 if(a==0){ … … 24 38 output=false 25 39 c=a; 26 }27 28 for(int i=0<i<n;i++){29 A[i]=B[i];30 B[i]=0;31 40 } 32 41 }}}