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 />

Intrinsic data types<br />

wherearray-spec is described in “Array declarations” on page 57; char-len<br />

is described with the CHARACTER statement in Chapter 10; and init-expr is<br />

described in “Initialization expressions” on page 91. If you include<br />

init-expr in entity, you must also include the double colon (::) separator.<br />

As an extension to the Standard, <strong>HP</strong> <strong>Fortran</strong> permits the use of slashes to<br />

delimit init-expr. The double colon separator, array constructors, and<br />

structure constructors are not allowed in this form of initialization. Arrays<br />

may be initialized by defining a list of values that are sequence associated<br />

with the elements of the array.<br />

Table 3-2 Attributes in type declaration statement<br />

Attribute Description<br />

AUTOMATIC Makes procedure variables automatic (extension).<br />

ALLOCATABLE Declares an array that can be allocated during execution.<br />

DIMENSION(array-spe<br />

c)<br />

Declares an array; see “Array declarations” on page 57. If<br />

entity-list also includes an array-spec, itoverridesthe<br />

DIMENSION attribute.<br />

EXTERNAL Specifies a subprogram or block data located in another program<br />

unit.<br />

INTENT Defines the mode of use of a dummy argument.<br />

INTRINSIC Allows a specific intrinsic name as an actual argument.<br />

OPTIONAL Declares the presence of an actual argument as optional.<br />

PARAMETER Defines named constants.<br />

POINTER Declarestheentitytobeapointer.<br />

PRIVATE Inhibits visibility outside a module.<br />

PUBLIC Provides visibility outside a module.<br />

SAVE Ensures the entity retains its value between calls of a procedure.<br />

STATIC Ensures the entity retains its value between calls of a procedure<br />

(extension).<br />

TARGET Enables the entity to be the target of a pointer.<br />

Chapter 3 29

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

Saved successfully!

Ooh no, something went wrong!