FORTRAN 77 Language Reference

Terminal Statement

If s is specified, the statement identified by it is called the terminal statement, and it must follow the DO WHILE statement. The terminal statement must not be one of the following statements:

If the terminal statement is a logical IF statement, it can contain any executable statement, except:

If s is not specified, the DO WHILE loop must end with an END DO statement.