<Syntax> |
|
|
|
TYPE [ [ , type-attr ]... :: ] type-name [ ( type-param-name-list ) ]
type-attr | ::= | ABSTRACT |
| | | BIND(C) |
| | | EXTENDS( parent-type-name ) |
| | | PRIVATE |
| | | PUBLIC |
type-param-name-list |
::= |
type-param-name [ , type-param-name ]... |
PUBLIC and PRIVATE are only permitted in the specification part of a module, and no more than one of them may appear.
|
|
|
|
|
|
<Semantics> |
|
|
|
The TYPE statement introduces a derived type definition.
If PUBLIC or PRIVATE appears on the TYPE statement, it specifies the accessibility of the type name.
In Fortran 2003, the ABSTRACT keyword declares an abstract type; such a
type can be used only for type extension and to declare polymorphic variables.
The BIND(C) clause declares that the type is interoperable with a C struct;
this puts strict limitations on the kind of components that are allowed.
The EXTENDS clause creates a new type by extending an old one (the “parent” type).
|
|
|
|
|
|
<Related> |
|
|
|
BIND attribute,
CLASS specifier,
Component definition statement,
Derived type definition,
END TYPE statement,
EXTENDS clause,
SEQUENCE statement |
|
|