I have a do while loop in my program, who\'s condition to continue keeps giving me off-by-one errors and I can\'t figure out why. It looks like this:
do while
Extending the answer High Performance Mark, here is one way to rewrite the loop:
ii_loop: do if (ii .gt. nri) exit ii_loop if (ed(ii) .gt. e1) exit ii_loop ! do some stuff ii = ii + 1 end do ii_loop