SELECT TYPE (Fortran 2003)
Purpose
The SELECT TYPE statement is the first statement in a SELECT TYPE construct. The construct can have any number of statement blocks, only one of which is selected for execution. The selection is based on the dynamic type and the KIND TYPE parameters of an expression, which you specify in the selector, the type and the corresponding KIND TYPE parameters of each type guard statement.
Syntax
Rules
If the selector is not a named variable, associate_name must appear. If the selector is not a definable variable or is a variable that has a vector subscript, associate_name must not appear in a variable definition context.
The selector must be polymorphic.
If the select_construct_name is specified, it must appear on the END SELECT statement and optionally on any type guard statements within the construct.
Related information
- SELECT TYPE construct (Fortran 2003)
- Type Guard (Fortran 2003)
- END (Construct), for details on the END SELECT statement
