next up previous contents index
Next: 5.5 Compiler switches and Up: 5.4 Comments Previous: 5.4.4 Comment lines   Contents   Index

5.4.5 Short comments after Fortran statements

The final statement of a counting do loop should have the loop index as comment as in:

  do i3=m3,n3
    do i2=m2,n2
      do i1=m1,n1
      end do ! i1
    end do ! i2
  end do ! i3

Long if..then..else constructs can have the branching condition (or an abbreviated version) as comment after the endif statement as in the (very short) example:

  if (Copyrho_flag) then
  endif ! (Copyrho_flag)