Version 1 (modified by pesei, 9 years ago) (diff)


Sample code for a named loops

regular case:

  jy_loop: &
  do jy=1,numy-1
  end do jy_loop

if the running parameter of the loop has a name that tells nothing, better use the upper bound as a name:

  numsomething_loop: &
  do i=1,numsomething
  end do numsomething_loop

If a similar loop appears more than once in a program unit:

  secondjy_loop: &
  do jy=1,numy-1
  end do secondjy_loop

Reason for not putting the name in the same line as the DO: make the do more easily recognisable
Reason for not indenting the continuation line: let DO and END DO be aligned

hosted by ZAMG