The end construct is used to terminate different FORTRAN loops and branching structures. The structures it can terminate are the do ( or do while ) loop, and the case, if and where constructs.
There really isn't much to discuss about this statement. About the only thing you should realize is that the END WHERE, END CASE and END IF statements are necessary to terminate their respective constructs. However, the END DO is not mandatory to terminate a do loop. A labeled statement (often continue ) can be used to terminate a DO loop when the label is included in the DO statement. If you need to see exactly how these statements fit into the overall picture, just follow the links to examples below.
End if examples: iftests.f and roof.f
End select examples: iftests.f and charvr90.f
End do examples: log_plot.f and newton1.f
End where example: where.f
Written by Jason Wehr : firstname.lastname@example.org and Maintained by John Mahaffy : email@example.com