02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Data types and data objects<br />

Derived types<br />

TYPE [[, access-spec] ::] type-name<br />

[private-sequence-statement] ...<br />

comp-definition-statement<br />

[comp-definition-statement] ...<br />

END TYPE [type-name]<br />

access-spec<br />

type-name<br />

42<br />

is one of:<br />

PRIVATE<br />

PUBLIC<br />

private-sequence-statement<br />

comp-definition-statement<br />

comp-attr-list<br />

comp-declaration<br />

access-spec is allowed only if the definition appears within a module. For<br />

more information about modules, see “Modules” on page 158. The PRIVATE<br />

and PUBLIC attributes are described in Chapter 10.<br />

isthenameofthetypebeingdefined.type-name must not conflict with the<br />

intrinsic type names.<br />

is a PRIVATE or SEQUENCE statement. The PRIVATE statement is allowed only<br />

if the definition appears within a module. For more information about the<br />

SEQUENCE statement, see “Sequence derived type” on page 43. Both<br />

statements are fully described in Chapter 10.<br />

takes the form:<br />

type-spec [[comp-attr-list]::]comp-decl<br />

Notice that the syntax does not allow for initialization.<br />

can only contain the DIMENSION and POINTER attributes. A component array<br />

without the POINTER attribute must have an explicit-shape specification<br />

with constant bounds. If a component is of the same derived type as the type<br />

being defined then the component must have the POINTER attribute. Both<br />

attributes are fully described in Chapter 10.<br />

takes the form:<br />

Chapter 3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!