Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 6/24/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Visible to Intel only — GUID: GUID-787723B2-317C-4E6E-A3FC-E72DC3F12422

Document Table of Contents

Declarations for Derived Types

A derived-type declaration specifies the properties of objects and functions of derived (user-defined) type.

The derived type must be defined before you can specify objects of that type in a TYPE type declaration.

An object of derived type must not have the PUBLIC attribute if its type is PRIVATE.

A structure constructor specifies values for derived-type objects.

Examples

The following are examples of derived-type declarations:

TYPE(EMPLOYEE) CONTRACT ... TYPE(SETS), DIMENSION(:,:), ALLOCATABLE :: SUBSET_1

The following example shows a public type with private components:

TYPE LIST_ITEMS PRIVATE ... TYPE(LIST_ITEMS), POINTER :: NEXT, PREVIOUS END TYPE LIST_ITEMS

See Also