2 | | == Variable Names == |
| 2 | == General guidelines == |
| 3 | |
| 4 | - comment your code extensively (everybody must understand what is being done) |
| 5 | - NEVER more than one blank line please! |
| 6 | |
| 7 | == C/C++ == |
| 8 | |
| 9 | - if/for should follow this: |
| 10 | {{{ |
| 11 | #!c |
| 12 | for(int i=0<i<n;i++) A[i]=i; |
| 13 | |
| 14 | if(a==0) bool=true; |
| 15 | |
| 16 | if(a==0){ |
| 17 | output=true; |
| 18 | c=b |
| 19 | } |
| 20 | else{ |
| 21 | output=false |
| 22 | c=a; |
| 23 | } |
| 24 | |
| 25 | for(int i=0<i<n;i++){ |
| 26 | A[i]=B[i]; |
| 27 | B[i]=0; |
| 28 | } |
| 29 | }}} |
| 30 | |
| 31 | == Matlab == |
| 32 | |
| 33 | - All matlab routines should start with a help (Example and See Also are not mandatory): |
| 34 | {{{ |
| 35 | #!m |
| 36 | function outputs=FunctionName(inputs) |
| 37 | %FUNCTIONNAME - one line description |
| 38 | % |
| 39 | % Extensive description of what is being done, inputs |
| 40 | % outputs, etc... |
| 41 | % |
| 42 | % Usage: |
| 43 | % outputs=FunctionName(inputs) |
| 44 | % |
| 45 | % Example: |
| 46 | % md.test=FunctionName(1); |
| 47 | % |
| 48 | % See Also: |
| 49 | % FunctionName2, FunctionName3, ... |
| 50 | }}} |
| 51 | |
| 52 | == Variable/Enum/Functions Names == |