Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Fortran 90 Programmer's Reference: HP Fortran 90 Programmer's Reference > Chapter 10 HP Fortran 90 statements

SEQUENCE

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

Imposes storage sequence on components of derived type object.

Syntax

SEQUENCE

Description

The SEQUENCE statement can appear once within any derived type definition; its presence specifies that a storage sequence on the components that is the same as their definition order. A derived type that includes the SEQUENCE statement in its definition is known as a sequence derived type. Sequence derived types are used:

  • To allow objects of sequence derived type to be storage associated with the COMMON and EQUIVALENCE statements.

  • To allow actual and dummy arguments to have the same type without use or host association. The corresponding actual and dummy arguments of derived types are of the same derived type if the derived-type objects refer to the same type definition. Alternatively, they are of the same type if all of the following are true:

    • They refer to different type definitions with the same name.

    • They have the SEQUENCE statement in their definitions.

    • The components have the same names and types and are in the same order.

    • None of the components is of a private type or of a type that has private access.

The following restrictions apply to the use of the SEQUENCE statement:

  • No more than one SEQUENCE statement may appear in the definition of a derived type.

  • If a derived type definition includes the SEQUENCE statement, each component that is of derived type must also include the SEQUENCE statement.

Examples

TYPE weather
! weather is a sequence derived type with two
! character components and two integer components
SEQUENCE
CHARACTER(LEN=32) place
INTEGER high_temp, low_temp
CHARACTER(LEN=16) conditions
END TYPE weather

Related statements

TYPE, COMMON, and EQUIVALENCE

Related concepts

For information about sequence derived types, see “Sequence derived type”.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.