Changes between Initial Version and Version 1 of FpCodingStandardSanmpleNamedloop


Ignore:
Timestamp:
Jul 3, 2015, 3:42:49 PM (9 years ago)
Author:
pesei
Comment:

create

Legend:

Unmodified
Added
Removed
Modified
  • FpCodingStandardSanmpleNamedloop

    v1 v1  
     1
     2== Sample code for a named loops ==
     3
     4regular case:
     5{{{
     6  jy_loop: &
     7  do jy=1,numy-1
     8    <statements>
     9  end do jy_loop
     10}}}
     11
     12if the running parameter of the loop has a name that tells nothing, better use the upper bound as a name:
     13{{{
     14  numsomething_loop: &
     15  do i=1,numsomething
     16    <statements>
     17  end do numsomething_loop
     18}}}
     19
     20If a similar loop appears more than once in a program unit:
     21{{{
     22  secondjy_loop: &
     23  do jy=1,numy-1
     24    <statements>
     25  end do secondjy_loop
     26}}}
     27
     28Reason for not putting the name in the same line as the DO: make the do more easily recognisable[[BR]]
     29Reason for not indenting the continuation line: let DO and END DO be aligned