HP Fortran for OpenVMS

HP Fortran for OpenVMS

Language Reference Manual

Order Number: BA368-90004


January 2005

This manual contains the complete description of the HP Fortran programming language, which includes Fortran 95 and Fortran 90 features.

Note

HP Fortran provides a number of extensions to the Fortran 95 Standard. In this online HTML version of the manual, these extensions are colored in teal.

Revision/Update Information: This is a new manual.

Software Version: HP Fortran for OpenVMS Systems Version 8.0

Operating System: OpenVMS Industry Standard 64 Systems Version 8.2
OpenVMS Alpha Systems Version 8.2




Hewlett-Packard Company Palo Alto, California


© Copyright 2005 Hewlett-Packard Development Company, L.P.

Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

Printed in the US

ZK6324

This manual is available on CD-ROM.

Contents Index


Preface

This manual contains the complete description of the HP Fortran programming language, which includes Fortran 95 and Fortran 90 features. It contains information about language syntax and semantics, adherence to various Fortran standards, and extensions to those standards.

Note

In this manual, the term OpenVMS refers to both OpenVMS I64 and OpenVMS Alpha systems. If there are differences in the behavior of the HP Fortran compiler on the two operating systems, those differences are noted in the text.

Intended Audience

This manual is intended for experienced applications programmers who have a basic understanding of Fortran concepts and the Fortran 95/90 language, and are using HP Fortran in either a single-platform or multiplatform environment.

Some familiarity with parallel programming concepts and OpenVMS is helpful. This manual is not a Fortran or programming tutorial.

Document Structure

This manual consists of the following chapters and appendixes:

Note

If you are reading the printed version of this manual, be aware that the version at the HP Fortran Web site and the version on the Documentation CD-ROM from HP may contain updated and/or corrected information.

Related Documents

The following documents are also useful:

Other Sources of Information

This section alphabetically lists some commercially published documents that provide reference or tutorial information on Fortran 95 and Fortran 90:

HP does not endorse these books or recommend them over other books on the same subjects.

Reader's Comments

HP welcomes your comments on this or any other HP Fortran manual. You can send comments by email to:


fortran@hp.com 

HP Fortran Web Page

The HP Fortran home page is at:


http://www.hp.com/go/fortran 

This Web site contains information about software patch kits, example programs, and additional product information.

Conventions

The following product names may appear in this manual:

All three names---the longer form and the two abbreviated forms---refer to the version of the OpenVMS operating system that runs on the Intel® Itanium® architecture.

The following conventions might be used in this manual:
Ctrl/ x A sequence such as Ctrl/ x indicates that you must hold down the key labeled Ctrl while you press another key or a pointing device button.
PF1 x A sequence such as PF1 x indicates that you must first press and release the key labeled PF1 and then press and release another key or a pointing device button.
[Return] In examples, a key name enclosed in a box indicates that you press a key on the keyboard. (In text, a key name is not enclosed in a box.)

In the HTML version of this document, this convention appears as brackets, rather than a box.

... A horizontal ellipsis in examples indicates one of the following possibilities:
  • Additional optional arguments in a statement have been omitted.
  • The preceding item or items can be repeated one or more times.
  • Additional parameters, values, or other information can be entered.
.
.
.
A vertical ellipsis indicates the omission of items from a code example or command format; the items are omitted because they are not important to the topic being discussed.
( ) In command format descriptions, parentheses indicate that you must enclose choices in parentheses if you specify more than one.
[ ] In command format descriptions, brackets indicate optional choices. You can choose one or more items or no items. Do not type the brackets on the command line. However, you must include the brackets in the syntax for OpenVMS directory specifications and for a substring specification in an assignment statement.
| In command format descriptions, vertical bars separate choices within brackets or braces. Within brackets, the choices are optional; within braces, at least one choice is required. Do not type the vertical bars on the command line.
{ } In command format descriptions, braces indicate required choices; you must choose at least one of the items listed. Do not type the braces on the command line.
bold type Bold type represents the introduction of a new term. It also represents the name of an argument, an attribute, or a reason.
italic type Italic type indicates important information, complete titles of manuals, or variables. Variables include information that varies in system output (Internal error number), in command lines (/PRODUCER= name), and in command parameters in text (where dd represents the predefined code for the device type).
UPPERCASE TYPE Uppercase type indicates a command, the name of a routine, the name of a file, or the abbreviation for a system privilege.
- A hyphen at the end of a command format description, command line, or code line indicates that the command or statement continues on the following line.
numbers All numbers in text are assumed to be decimal unless otherwise noted. Nondecimal radixes---binary, octal, or hexadecimal---are explicitly indicated.
real This term refers to all floating-point intrinsic data types as a group.
complex This term refers to all complex floating-point intrinsic data types as a group.
logical This term refers to logical intrinsic data types as a group.
integer This term refers to integer intrinsic data types as a group.
Fortran This term refers to language information that is common to ANSI FORTRAN-77, ANSI/ISO Fortran 90, ANSI/ISO Fortran 95, and HP Fortran 90.
Fortran 90 This term refers to language information that is common to ANSI/ISO Fortran 90 and HP Fortran. For example, a new language feature introduced in the Fortran 90 standard.
Fortran 95 This term refers to language information that is common to ISO Fortran 95 and HP Fortran. For example, a new language feature introduced in the Fortran 95 standard.
HP Fortran Unless otherwise specified, this term (formerly Compaq Fortran) refers to language information that is common to the Fortran 90 and 95 standards, and any HP Fortran extensions, running on the OpenVMS operating system. Since the Fortran 90 standard is a superset of the FORTRAN-77 standard, HP Fortran also supports the FORTRAN-77 standard. HP Fortran supports all of the deleted features of the Fortran 95 standard.


Chapter 1
Overview

This chapter describes:

1.1 Language Standards Conformance

Fortran 95 includes Fortran 90 and most features of FORTRAN 77. Fortran 90 is a superset that includes FORTRAN 77. HP Fortran fully supports the Fortran 95, Fortran 90, and FORTRAN 77 Standards.

HP Fortran conforms to the American National Standard Fortran 95 (ANSI X3J3/96-007)1 and the American National Standard Fortran 90 (ANSI X3.198-1992)2.

The ANSI committee X3J3 answers questions of interpretation of Fortran 95 and Fortran 90 language features. Any answers given by the ANSI committee that are related to features implemented in HP Fortran may result in changes in future releases of the HP Fortran compiler, even if the changes produce incompatibilities with earlier releases of HP Fortran.

HP Fortran provides a number of extensions to the Fortran 95 Standard. In the online HTML version of this manual, these extensions are colored in teal.

HP Fortran also includes support for programs that conform to the previous Fortran standards (ANSI X3.9-1978 and ANSI X3.0-1966), the International Standards Organization standard ISO 1539-1980 (E), the Federal Information Processing Institute standard FIPS 69-1, and the Military Standard 1753 Language Specification.

For More Information:

On HP Fortran language extensions, see Appendix E.

Note

1 This is the same as International Standards Organization standard ISO/IEC 1539-1:1997 (E).

2 This is the same as International Standards Organization standard ISO/IEC 1539:1991 (E).

1.2 Language Compatibility

HP Fortran is highly compatible with Compaq Fortran 77 on supported platforms, and it is substantially compatible with PDP-11 and VAX FORTRAN 77.

For More Information:

On language compatibility, compiler options, and program conversion considerations, see the HP Fortran for OpenVMS User Manual.

1.3 Fortran 95 Features

Following are some of the Fortran 95 features implemented in HP Fortran:

1.4 Fortran 90 Features

Following are some of the Fortran 90 features implemented in HP Fortran:


Next Contents Index