Purpose
The Derived Type statement is the first statement of a derived-type definition.
Format
>>-TYPE--+------------------------+--type_name-----------------><
'-+----------------+--::-'
'-,--access_spec-'
|
Rules
access_spec can only be specified if the derived-type definition is within the specification part of a module.
type_name cannot be the same as the name of any intrinsic type, except BYTE, or the name of any other accessible derived type.
If a label is specified on the Derived Type statement, the label belongs to the scoping unit of the derived-type definition.
If the corresponding END TYPE statement specifies a name, it must be the same as type_name.
Examples
MODULE ABC
TYPE, PRIVATE :: SYSTEM ! Derived type SYSTEM can only be accessed
SEQUENCE ! within module ABC
REAL :: PRIMARY
REAL :: SECONDARY
CHARACTER(20), DIMENSION(5) :: STAFF
END TYPE
END MODULE
Related Information