Changes between Version 1 and Version 2 of FpCodingStandard


Ignore:
Timestamp:
May 22, 2014, 11:18:09 AM (10 years ago)
Author:
pesei
Comment:

Proper formatting; note that original version was by "admin", but comes from ansto

Legend:

Unmodified
Added
Removed
Modified
  • FpCodingStandard

    v1 v2  
    1 1. Explain all variables you use in writing (as comment)
     1 
     2== FLEXPART Coding Standards ==
    23
    3 2. Comment all code
     4 1. Explain all variables you use in writing (as comment)
    45
    5 3. As much as possible, integer variables should have names starting
    6 with i,j,k,l,m,n
     6  2. Comment all code
    77
    8 4. Use indentations for loops, if-statements, etc. From start til end of
    9 loop, all code lines should be indented by 2 spaces; nested loops should
    10 have multiple indentations so that the looping level is always clear.
    11 Because of automatic transcription to F90 standards, a lot of this has
    12 been lost and we should try to reintroduce this whereever it has been lost.
     8  3. As much as possible, integer variables should have names starting with `i,j,k,l,m,n`
    139
    14 5. Variables that are passed between subroutines should be marked in the
    15 subroutine as input (i), output (o) or both (i/o) when values are
    16 changed both in the subroutine and in other routines. This should be
    17 done just below the subroutine statement. Again, this has become a mess
    18 because of the automatic transcription. We will try to make it
    19 systematic again.
     10  4. Use indentations for loops, `if`-statements, etc. From start till end of loop, all code lines should be indented by 2 spaces; nested loops should have multiple indentations so that the looping level is always clear. Because of automatic transcription to F90 standards, a lot of this has been lost and we should try to reintroduce this whereever it has been lost.
    2011
    21 6. If you make changes in a subroutine, explain them in the header: Why?
    22 What? When?
     12  5. Variables that are passed between subroutines should be marked in the subroutine as input (`i)`, output (`o`) or both (`i/o`) when values are changed both in the subroutine and in other routines. This should be done just below the subroutine statement. Again, this has become a mess because of the automatic transcription. We will try to make it systematic again.
     13
     14  6. If you make changes in a subroutine, explain them in the header: Why? What? When?