02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

EQUIVALENCE<br />

Associates different objects with same storage area.<br />

Syntax<br />

EQUIVALENCE (equivalence-list1) [, (equivalence-list2)]...<br />

<strong>HP</strong> <strong>Fortran</strong> statements<br />

EQUIVALENCE<br />

equivalence-list is a comma-separated list of two or more object names to be storage<br />

associated. Objects can include simple variables, array elements, array<br />

names, and character substrings.<br />

Description<br />

All objects in each equivalence-list share the same storage area. Such objects become<br />

storage associated and are equivalenced to each other. Equivalencing may also cause other<br />

objects to become storage associated.<br />

The following items must not appear in equivalence-list:<br />

Automatic objects, including character variables whose length is specified with a<br />

nonconstant<br />

Allocatable arrays<br />

Function names, result names, or entry names<br />

Dummy arguments<br />

Records or record field references<br />

Nonsequenced derived-type objects<br />

Derived-type components<br />

Pointers or derived-type objects containing pointers<br />

Named constants<br />

Derived-type objects may appear in an EQUIVALENCE statement if they have been defined with<br />

the SEQUENCE attribute.<br />

The following restrictions apply to objects that can appear in an EQUIVALENCE statement:<br />

Objects in the same equivalence-list must be explicitly or implicitly declared in the<br />

same scoping unit.<br />

The name of an equivalenced object must not be made available by use association.<br />

Chapter 10 319

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

Saved successfully!

Ooh no, something went wrong!