next up previous contents
Next: STOP Up: More on Flow Control Previous: SELECT CASE   Contents

Exceptional Situations

All the control flow constructs described so far enter the construct at only one place (IF, DO or SELECT CASE) and exit the construct at only one place also (END IF, END DO or END SELECT respectively). This enables the programmer to easily control the logic of the code.

In some situations, it is convenient to have the possibility to exit the constructs at different places; for example, if an error in the data was detected, measures have to be taken right away, even if we are in the middle of several multiple nested DO loops.

Fortran provides 3 different means to achieve this.


Adrian Sandu 2001-08-26