Compaq Fortran

Compaq Fortran

User Manual for
OpenVMS Alpha Systems

Order Number: AA--QJRWB--TE


April 1999

This manual provides information about the Compaq Fortran (formerly DEC Fortran 90 and DIGITAL Fortran 90) program development environment on Compaq OpenVMS Alpha systems.

It describes compiling, linking, running, and debugging Compaq Fortran programs. It also describes the run-time environment, including run-time performance, I/O and error-handling support, data types, numeric data conversion, calling other procedures, and compatibility with Compaq Fortran 77 (formerly DEC Fortran).

Revision/Update Information: This manual replaces the DEC Fortran 90 User Manual for OpenVMS AXP Systems AA-QJRWA--TE.

Software Version: Compaq Fortran for OpenVMS Alpha Systems Version 7.2 or higher

Compaq Computer Corporation
Houston, Texas


First Printing, April 1995
Revision, April 1999

Compaq Computer Corporation makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description.

Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Compaq or an authorized sublicensor.

Copyright ©1995, 1999

Compaq, the COMPAQ logo, DEC, DECnet, DIGITAL, POLYCENTER, VAX, and VMS are registered in the U.S. Patent and Trademark Office.

AXP, DEC Fortran, DECwindows, OpenVMS, and VAX FORTRAN are trademarks of Compaq Computer Corporation.

Microsoft, NT, and Windows are either trademarks or registered trademarks of Microsoft Corporation in the United States and other countries.

CRAY is a registered trademark of Cray Research, Incorporated.
Hewlett-Packard and HP-UX are registered trademarks of the Hewlett-Packard Company.
IBM is a registered trademark of International Business Machines, Inc.
IEEE is a registered trademark of the Institute of Electrical and Electronics Engineers, Inc.
KAP is a registered trademark of Kuck and Associates, Inc.
Motif is a registered trademark of the Open Software Foundation, Inc., licensed by Compaq;
OpenMP and the OpenMP logo are trademarks of OpenMP Architecture Review Board.
RISC System/6000 is a registered trademark of International Business Machines, Inc.
SUN is a registered trademark of Sun Microsystems, Inc.
System\370 is a registered trademark of International Business Machines, Inc.
UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Ltd.

Other product names mentioned herein may be trademarks of respective companies.

Cover graphic, photographs: Copyright © 1997 PhotoDisc, Inc.

Cover graphic, image: CERN, European Laboratory for Particle Physics: ALICE detector on CERN's future accelerator, the LHC, Large Hadron Collider.

ZK6443

This document is available on CD-ROM.

This document was prepared using VAX DOCUMENT, Version V3.2-1m.

Contents Index


Preface

This manual describes the Compaq Fortran compiler command, compiler, and run-time environment. This includes how to compile, link, execute, and debug Compaq Fortran programs on an Alpha system (Alpha processor architecture) running the Compaq OpenVMS Alpha operating system. It also describes performance guidelines, I/O and error-handling support, calling other procedures, and compatibility.

Intended Audience

This manual makes the following assumptions about you, the reader:

Structure of This Document

This manual consists of the following chapters and appendixes:

Associated Documents

The following documents may also be useful to Compaq Fortran programmers:

Sending Compaq Your Comments on This Manual

We welcome your comments on this or any other Compaq Fortran manual. You can send comments to us in the following ways:

If you have suggestions for improving particular sections or find any errors, please indicate the title, order number, and section numbers. Compaq also welcomes general comments.

Getting Help from Compaq

If you have a customer support contract and have comments or questions about Compaq Fortran software, you can contact the Compaq Customer Support Center (CSC), preferably using electronic means such as DSNlink. In the United States, customers can call the CSC at 1-800-354-9000.

You may also send comments, questions and suggestions about the Compaq Fortran product to the following Internet mail address: fortran@compaq.com. Please note, however, that this address is for informational inquiries only. It is not a formal support channel.

Compaq Fortran World Wide Web Pages

If you have Internet access and a World Wide Web (WWW) browser, you are invited to view the Compaq Fortran home page, located at the following URL:


http://www.compaq.com/fortran/ 

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

Conventions Used in this Document

This manual uses the conventions shown in Table 1:

Table 1 Conventions Used in This Document
Convention Meaning
$ This manual uses a dollar sign ($) to represent the user prompt.
[Return] This symbol indicates that you must press the named key on the keyboard.
Ctrl/ x This symbol indicates that you must press the Ctrl key while you simultaneously press the key labeled x.
$ FORT
_File:
This manual displays system prompts and responses using a monospaced font. Typed user input is displayed in a bold monospaced font.
newterm Bold type indicates the introduction of a new term in text.
variable Italic type indicates important information, a complete title of a manual, or variable information, such as user-supplied information in command or option syntax.
Large braces enclose lists from which you must choose one item. The large braces do not appear in HTML output. For example:
  • STATUS
  • DISPOSE
  • DISP
[ ] Square brackets enclose items that are optional. For example: BLOCK DATA [nam]

... A horizontal ellipsis means that the item preceding the ellipsis can be repeated. For example: s[,s]...

.
.
.
A vertical ellipsis in a figure or example means that not all of the statements are shown.
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.
DECwindows, DECwindows Motif References to DECwindows or DECwindows Motif refer to DECwindows Motif software.
Fortran This term refers to language information that is common to ANSI FORTRAN-77, ANSI/ISO Fortran 90, ANSI/ISO Fortran 95, and Compaq Fortran 90.
Fortran 90 This term refers to language information that is common to ANSI/ISO Fortran 90 and Compaq 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 Compaq Fortran. For example, a new language feature introduced in the Fortran 95 standard.
Compaq Fortran
(DEC Fortran 90)
The term Compaq Fortran (formerly DEC Fortran 90 and DIGITAL Fortran 90) refers to language information that is common to the Fortran 90 and 95 standards, and any Compaq Fortran extensions. Since the Fortran 90 standard is a superset of the FORTRAN-77 standard, Compaq Fortran also supports the FORTRAN-77 standard. Compaq Fortran supports all of the deleted features of the Fortran 95 standard.
Compaq Fortran 77
(DEC Fortran)
The term Compaq Fortran 77 (formerly DEC Fortran) refers to language information that is common to the FORTRAN-77 standard and any Compaq Fortran 77 extensions.
VMS®, OpenVMS References to VMS, VMS system, OpenVMS, or OpenVMS system refer to the OpenVMS operating system.


Chapter 1
Getting Started

Compaq Fortran (formerly DEC Fortran 90 and DIGITAL Fortran 90) conforms to:

Compaq Fortran supports all of the deleted features of the Fortran 95 standard.

Compaq Fortran also includes partial support for the High Performance Fortran Language Specification.

Compaq 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.

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

Compaq Fortran provides a number of extensions to the Fortran 90 and 95 standards. Compaq Fortran extensions to the latest Fortran standard are generally provided for compatibility with Compaq Fortran 77 extensions to the ANSI FORTRAN-77 standard.

When creating new programs that need to be standard-conforming for portability reasons, you should avoid or minimize the use of extensions to the latest Fortran standard. Extensions to the appropriate Fortran standard are identified visually in the Compaq Fortran Language Reference Manual, which defines the Compaq Fortran language.

This chapter provides information on the following topics:

1.1 The Compaq Fortran Programming Environment

The following aspects of Fortran 90/95 are relevant to the compilation environment and should be considered before extensive coding begins:

For More Information:

1.2 Commands to Create and Run an Executable Program

Example 1-1 shows a short Fortran 90/95 main program using free form source.

Example 1-1 Sample Main Program

! File hello.f90 
 
     PROGRAM HELLO_TEST 
 
       PRINT *, 'hello world' 
       PRINT *, ' ' 
 
     END PROGRAM HELLO_TEST 

To create and revise your source files, use a text editor, such as the Extensible Versatile Editor (EVE). For instance, to use EVE to edit the file HELLO.F90, type:


$ EDIT HELLO.F90

The following FORTRAN command compiles the program named HELLO.F90. The LINK command links the compiled object file into an executable program file named HELLO.EXE:


$ FORTRAN HELLO.F90
$ LINK HELLO

In this example, because all external routines used by this program reside in standard OpenVMS libraries searched by the LINK command, additional libraries or object files are not specified on the LINK command line.

To run the program, type the RUN command and the program name:


$ RUN HELLO

If the executable program is not in your current default directory, specify the directory before the file name. Similarly, if the executable program resides on a different device than your current default device, specify the device name and directory name before the file name.

For More Information:


Next Contents Index