SELECT CASE construct

Standard: F77 F90 F95 F2003 F2008 F2018 Example program


<Syntax>

select-case-stmt
      [ case-stmt
      block ]...
end-select-stmt

<Semantics>

The SELECT CASE construct begins with a SELECT CASE statement and ends with an END SELECT statement. When the SELECT CASE statement is executed, its selector expression is evaluated; if its value satisfies one of the CASE conditions, the corresponding block is executed, otherwise control is transferred to the END SELECT statement.

Note that the CASE conditions must be mutually exclusive (so that no more than one condition can be satisfied at a time).

<Related>

CASE statement, CASE DEFAULT statement, END SELECT statement, SELECT CASE statement