HP Fortran Programmer's Reference (September 2007)

Data types and data objects
Derived types
Chapter 5124
TYPE [[,
access-spec
] ::]
type-name
[
private-sequence-statement
] ...
comp-definition-statement
[
comp-definition-statement
] ...
END TYPE [
type-name
]
access-spec
is one of:
PRIVATE
PUBLIC
access-spec
is allowed only if the definition appears within a module. For
more information about modules, see “Modules” on page 190. The PRIVATE
and PUBLIC attributes are described in Chapter 10.
type-name
is the name of the type being defined.
type-name
must not conflict with the
intrinsic type names.
private-sequence-statement
is a PRIVATE or SEQUENCE statement. The PRIVATE statement is allowed only
if the definition appears within a module. For more information about the
SEQUENCE statement, see “Sequence derived type” on page 125. Both
statements are fully described in Chapter 10.
comp-definition-statement
takes the form:
type-spec
[[
comp-attr-list
]::]
comp-decl
Notice that the syntax does not allow for initialization.
comp-attr-list
can only contain the DIMENSION and POINTER attributes. A component array
without the POINTER attribute must have an explicit-shape specification
with constant bounds. If a component is of the same derived type as the type
being defined then the component must have the POINTER attribute. Both
attributes are fully described in Chapter 10.
comp-declaration
takes the form: