I am working on Fortran Code. While analyzing the code, I noticed something like this:
SUBROUTINE TEST(I,Z)
...
...
SELECT CASE (Z)
CASE(:1)
bla bla Code
IF(a.GT.b) GO TO 220
CASE(:2)
bla bla Code
IF(c.GT.d) GO TO 220
CASE(:3)
bla bla Code
IF(e.GT.f) GO TO 220
Code goes on...
Code goes on...
220 RETURN
Code goes on...
RETURN
END
What I do not get: what does the RETURN "command" stand for/doing?
For the algorithm it is important that Case1, Case2 and Case3 are excecuted. So my guess is, that if the if condition is true, it jumps from e.g. Case1 to RETURN, what could mean: leave the subroutine. In this case : go on with CASE2. But then one could directly say: GO TO ...next case.
I have nothing found in the World Wide Web. Can someone help me?
Thanks :-)