Changes between Version 3 and Version 4 of FpCodingStandard


Ignore:
Timestamp:
Jul 16, 2014, 11:16:24 AM (10 years ago)
Author:
pesei
Comment:

enhance 3. and 4.

Legend:

Unmodified
Added
Removed
Modified
  • FpCodingStandard

    v3 v4  
    66  2. Comment all code
    77
    8   3. As much as possible, integer variables should have names starting with `i,j,k,l,m,n`
     8  3. As much as possible, ''integer'' variables should have names starting with `i,j,k,l,m,n`, and don't use ''real'' variable names with these initials.[[br]]Typically, `i` and `r` or `x` can be placed in front of any other name to make it conform this specification.
    99
    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.
     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. Indenting by whitespace only, not tab characters (check your editor settings!).
    1111
    1212  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.