I have a Fortran77 snippet that looks like this:
DO 1301 N=NMLK-2,2,-1
Some code...
IF(NB1(N).EQ.50) GOTO 1300
Some code...
IF(BS(N).EQ.0.0) GOTO 1301
some code...
GOTO 1301
1300 NW(M)=NB1(N)
Some code...
1301 CONTINUE
When this hits the GOTO 1301 statement, does this jump to the next iteration of the loop or does it exit the loop? As far as I understand the return keyword does nothing, so I assume that this will just exit the loop and continue code execution from label 1301, is that correct?
I am translating this to C# and am wondering if this is equivalent:
for (N = NMLK; N >= 2; N--)
{
Some code...
if (NB1[N] == 50)
goto l1300;
Some code...
if (BS[N] == 0)
return;
Some code...
return;
l1300:
NW[M] = NB1[N];
Some code...
}
or if I should have "continue" instead of "return"?