# Compaq Fortran

# Language Reference Manual

Order Number: AA-Q66SD-TK

September 1999

This manual contains the complete description of the Compaq Fortran (formerly DIGITAL Fortran) programming language, which includes Fortran 95, Fortran 90, and High Performance Fortran. It contains information on language syntax and semantics, on adherence to various Fortran standards, and on extensions to those standards.

Revision/Update Information | This revised manual supersedes all previous DIGITAL Fortran and DEC Fortran 90 language reference manuals.

Compaq Computer Corporation
Houston, Texas

© 2001 Compaq Information Technologies Group, L.P.

# Contents

Preface

1 Overview

  1.1 Language Standards Conformance
  1.2 Language Compatibility
  1.3 Fortran 95 Features
  1.4 Fortran 90 Features
  1.5 High Performance Fortran Features

2 Program Structure, Characters, and Source Forms

  2.1 Program Structure
    2.1.1 Statements
    2.1.2 Names
  2.2 Character Sets
  2.3 Source Forms
    2.3.1 Free Source Form
    2.3.2 Fixed and Tab Source Forms
      2.3.2.1 Fixed-Format Lines
      2.3.2.2 Tab-Format Lines
    2.3.3 Source Code Useable for All Source Forms

3 Data Types, Constants, and Variables

  3.1 Intrinsic Data Types
    3.1.1 Integer Data Types
    3.1.2 Real Data Types
      3.1.2.1 General Rules for Real Constants
      3.1.2.2 REAL(4) Constants
      3.1.2.3 REAL(8) or DOUBLE PRECISION Constants
      3.1.2.4 REAL(16) Constants (VMS, U*X)
    3.1.3 Complex Data Types
      3.1.3.1 General Rules for Complex Constants
      3.1.3.2 COMPLEX(4) Constants
      3.1.3.3 COMPLEX(8) or DOUBLE COMPLEX Constants
      3.1.3.4 COMPLEX(16) Constants (VMS, U*X)
    3.1.4 Logical Data Types
    3.1.5 Character Data Type
      3.1.5.1 C Strings in Character Constants
      3.1.5.2 Character Substrings
  3.2 Derived Data Types
    3.2.1 Derived-Type Definition
    3.2.2 Default Initialization
    3.2.3 Structure Components
    3.2.4 Structure Constructors
  3.3 Binary, Octal, Hexadecimal, and Hollerith Constants
    3.3.1 Binary Constants
    3.3.2 Octal Constants
    3.3.3 Hexadecimal Constants
    3.3.4 Hollerith Constants
    3.3.5 Determining the Data Type of Nondecimal Constants
  3.4 Variables
    3.4.1 Data Types of Scalar Variables
      3.4.1.1 Specification of Data Type
      3.4.1.2 Implicit Typing Rules
    3.4.2 Arrays
      3.4.2.1 Whole Arrays
      3.4.2.2 Array Elements
      3.4.2.3 Array Sections
      3.4.2.4 Array Constructors
      3.4.2.5 Data Mapping of Arrays (TU*X only)

4 Expressions and Assignment Statements

  4.1 Expressions
    4.1.1 Numeric Expressions
      4.1.1.1 Using Parentheses in Numeric Expressions
      4.1.1.2 Data Type of Numeric Expressions
    4.1.2 Character Expressions
    4.1.3 Relational Expressions
    4.1.4 Logical Expressions
    4.1.5 Defined Operations
    4.1.6 Summary of Operator Precedence
    4.1.7 Initialization and Specification Expressions
      4.1.7.1 Initialization Expressions
      4.1.7.2 Specification Expressions
  4.2 Assignment Statements
    4.2.1 Intrinsic Assignments
      4.2.1.1 Numeric Assignment Statements
      4.2.1.2 Logical Assignment Statements
      4.2.1.3 Character Assignment Statements
      4.2.1.4 Derived-Type Assignment Statements
      4.2.1.5 Array Assignment Statements
    4.2.2 Defined Assignments
    4.2.3 Pointer Assignments
    4.2.4 WHERE Statement and Construct
    4.2.5 FORALL Statement and Construct

5 Specification Statements

  5.1 Type Declaration Statements
    5.1.1 Declaration Statements for Noncharacter Types
    5.1.2 Declaration Statements for Character Types
    5.1.3 Declaration Statements for Derived Types
    5.1.4 Declaration Statements for Arrays
      5.1.4.1 Explicit-Shape Specifications
      5.1.4.2 Assumed-Shape Specifications
      5.1.4.3 Assumed-Size Specifications
      5.1.4.4 Deferred-Shape Specifications
  5.2 ALLOCATABLE Attribute and Statement
  5.3 AUTOMATIC and STATIC Attributes and Statements
  5.4 COMMON Statement
  5.5 DATA Statement
  5.6 DIMENSION Attribute and Statement
  5.7 EQUIVALENCE Statement
    5.7.1 Making Arrays Equivalent
    5.7.2 Making Substrings Equivalent
    5.7.3 EQUIVALENCE and COMMON Interaction
  5.8 EXTERNAL Attribute and Statement
  5.9 IMPLICIT Statement
  5.10 INTENT Attribute and Statement
  5.11 INTRINSIC Attribute and Statement
  5.12 NAMELIST Statement
  5.13 OPTIONAL Attribute and Statement
  5.14 PARAMETER Attribute and Statement
  5.15 POINTER Attribute and Statement
  5.16 PRIVATE and PUBLIC Attributes and Statements
  5.17 SAVE Attribute and Statement
  5.18 TARGET Attribute and Statement
  5.19 VOLATILE Attribute and Statement

6 Dynamic Allocation

  6.1 ALLOCATE Statement
    6.1.1 Allocation of Allocatable Arrays
    6.1.2 Allocation of Pointer Targets
  6.2 DEALLOCATE Statement
    6.2.1 Deallocation of Allocatable Arrays
    6.2.2 Deallocation of Pointer Targets
  6.3 NULLIFY Statement

7 Execution Control

  7.1 Branch Statements
    7.1.1 Unconditional GO TO Statement
    7.1.2 Computed GO TO Statement
    7.1.3 The ASSIGN and Assigned GO TO Statements
      7.1.3.1 ASSIGN Statement
      7.1.3.2 Assigned GO TO Statement
    7.1.4 Arithmetic IF Statement
  7.2 CALL Statement
  7.3 CASE Construct
  7.4 CONTINUE Statement
  7.5 DO Constructs
    7.5.1 Forms for DO Constructs
    7.5.2 Execution of DO Constructs
      7.5.2.1 Iteration Loop Control
      7.5.2.2 Nested DO Constructs
      7.5.2.3 Extended Range
    7.5.3 DO WHILE Statement
    7.5.4 CYCLE Statement
    7.5.5 EXIT Statement
  7.6 END Statement
  7.7 IF Construct and Statement
    7.7.1 IF Construct
    7.7.2 IF Statement
  7.8 PAUSE Statement
  7.9 RETURN Statement
  7.10 STOP Statement

8 Program Units and Procedures

  8.1 Main Program
  8.2 High Performance Fortran Prefixes for Program Units
  8.3 Modules and Module Procedures
    8.3.1 Module References
    8.3.2 USE Statement
  8.4 Block Data Program Units
  8.5 Functions, Subroutines, and Statement Functions
    8.5.1 General Rules for Function and Subroutine Subprograms
      8.5.1.1 Recursive Procedures
      8.5.1.2 Pure Procedures
      8.5.1.3 Elemental Procedures
    8.5.2 Functions
      8.5.2.1 RESULT Keyword
      8.5.2.2 Function References
    8.5.3 Subroutines
    8.5.4 Statement Functions
  8.6 External Procedures
  8.7 Internal Procedures
  8.8 Argument Association
    8.8.1 Optional Arguments
    8.8.2 Array Arguments
    8.8.3 Pointer Arguments
    8.8.4 Assumed-Length Character Arguments
    8.8.5 Character Constant and Hollerith Arguments
    8.8.6 Alternate Return Arguments
    8.8.7 Dummy Procedure Arguments
    8.8.8 References to Generic Procedures
      8.8.8.1 References to Generic Intrinsic Functions
      8.8.8.2 References to Elemental Intrinsic Procedures
    8.8.9 References to Non-Fortran Procedures
      8.8.9.1 %DESCR (VMS only), %REF, and %VAL Argument List Functions
      8.8.9.2 %LOC Function
  8.9 Procedure Interfaces
    8.9.1 Determining When Procedures Require Explicit Interfaces
    8.9.2 Defining Explicit Interfaces
    8.9.3 Defining Generic Names for Procedures
    8.9.4 Defining Generic Operators
    8.9.5 Defining Generic Assignment
  8.10 CONTAINS Statement
  8.11 ENTRY Statement
    8.11.1 ENTRY Statements in Function Subprograms
    8.11.2 ENTRY Statements in Subroutine Subprograms

9 Intrinsic Procedures

  9.1 Argument Keywords in Intrinsic Procedures
  9.2 Overview of Intrinsic Procedures
    9.2.1 Categories of Intrinsic Functions
    9.2.2 Intrinsic Subroutines
    9.2.3 Bit Functions
  9.3 Descriptions of Intrinsic Procedures
    9.3.1 ABS (A)
    9.3.2 ACHAR (I)
    9.3.3 ACOS (X)
    9.3.4 ACOSD (X)
    9.3.5 ADJUSTL (STRING)
    9.3.6 ADJUSTR (STRING)
    9.3.7 AIMAG (Z)
    9.3.8 AINT (A [, KIND])
    9.3.9 ALL (MASK [, DIM])
    9.3.10 ALLOCATED (ARRAY)
    9.3.11 ANINT (A [, KIND])
    9.3.12 ANY (MASK [, DIM])
    9.3.13 ASIN (X)
    9.3.14 ASIND (X)
    9.3.15 ASM (STRING [, A,...]) (Alpha only)
    9.3.16 ASSOCIATED (POINTER [, TARGET])
    9.3.17 ATAN (X)
    9.3.18 ATAND (X)
    9.3.19 ATAN2 (Y, X)
    9.3.20 ATAN2D (Y, X)
    9.3.21 BIT_SIZE (I)
    9.3.22 BTEST (I, POS)
    9.3.23 CEILING (A [, KIND])
    9.3.24 CHAR (I [, KIND])
    9.3.25 CMPLX (X [,Y] [, KIND])
    9.3.26 CONJG (Z)
    9.3.27 COS (X)
    9.3.28 COSD (X)
    9.3.29 COSH (X)
    9.3.30 COTAN (X)
    9.3.31 COTAND (X)
    9.3.32 COUNT (MASK [, DIM])
    9.3.33 CPU_TIME (TIME)
    9.3.34 CSHIFT (ARRAY, SHIFT [, DIM])
    9.3.35 DATE (BUF)
    9.3.36 DATE_AND_TIME ([DATE] [, TIME] [, ZONE] [, VALUES])
    9.3.37 DBLE (A)
    9.3.38 DCMPLX (X [, Y])
    9.3.39 DFLOAT (A)
    9.3.40 DIGITS (X)
    9.3.41 DIM (X, Y)
    9.3.42 DOT_PRODUCT (VECTOR_A, VECTOR_B)
    9.3.43 DPROD (X, Y)
    9.3.44 DREAL (A)
    9.3.45 EOF (A)
    9.3.46 EOSHIFT (ARRAY, SHIFT [, BOUNDARY] [, DIM])
    9.3.47 EPSILON (X)
    9.3.48 ERRSNS ([IO_ERR] [, SYS_ERR] [, STAT] [, UNIT] [, COND])
    9.3.49 EXIT ([STATUS])
    9.3.50 EXP (X)
    9.3.51 EXPONENT (X)
    9.3.52 FLOOR (A [, KIND])
    9.3.53 FP_CLASS (X)
    9.3.54 FRACTION (X)
    9.3.55 FREE (A)
    9.3.56 HUGE (X)
    9.3.57 IACHAR (C)
    9.3.58 IAND (I, J)
    9.3.59 IARGCOUNT ( ) (VMS only)
    9.3.60 IARGPTR ( )
    9.3.61 IBCHNG (I, POS)
    9.3.62 IBCLR (I, POS)
    9.3.63 IBITS (I, POS, LEN)
    9.3.64 IBSET (I, POS)
    9.3.65 ICHAR (C)
    9.3.66 IDATE (I, J, K)
    9.3.67 IEOR (I, J)
    9.3.68 ILEN (I)
    9.3.69 INDEX (STRING, SUBSTRING [, BACK] [, KIND])
    9.3.70 INT (A [, KIND])
    9.3.71 INT_PTR_KIND ( )
    9.3.72 IOR (I, J)
    9.3.73 ISHA (I, SHIFT)
    9.3.74 ISHC (I, SHIFT)
    9.3.75 ISHFT (I, SHIFT)
    9.3.76 ISHFTC (I, SHIFT [, SIZE])
    9.3.77 ISHL (I, SHIFT)
    9.3.78 ISNAN (X)
    9.3.79 KIND (X)
    9.3.80 LBOUND (ARRAY [, DIM] [, KIND])
    9.3.81 LEADZ (I)
    9.3.82 LEN (STRING [, KIND])
    9.3.83 LEN_TRIM (STRING [, KIND])
    9.3.84 LGE (STRING_A, STRING_B)
    9.3.85 LGT (STRING_A, STRING_B)
    9.3.86 LLE (STRING_A, STRING_B)
    9.3.87 LLT (STRING_A, STRING_B)
    9.3.88 LOC (X)
    9.3.89 LOG (X)
    9.3.90 LOG10 (X)
    9.3.91 LOGICAL (L [, KIND])
    9.3.92 MALLOC (I)
    9.3.93 MATMUL (MATRIX_A, MATRIX_B)
    9.3.94 MAX (A1, A2 [, A3,...])
    9.3.95 MAXEXPONENT (X)
    9.3.96 MAXLOC (ARRAY [, DIM] [, MASK] [, KIND])
    9.3.97 MAXVAL (ARRAY [, DIM] [, MASK])
    9.3.98 MERGE (TSOURCE, FSOURCE, MASK)
    9.3.99 MIN (A1, A2 [, A3,...])
    9.3.100 MINEXPONENT (X)
    9.3.101 MINLOC (ARRAY [, DIM] [, MASK] [, KIND])
    9.3.102 MINVAL (ARRAY [, DIM] [, MASK])
    9.3.103 MOD (A, P)
    9.3.104 MODULO (A, P)
    9.3.105 MULT_HIGH (I, J) (Alpha only)
    9.3.106 MVBITS (FROM, FROMPOS, LEN, TO, TOPOS)
    9.3.107 MY_PROCESSOR ( )
    9.3.108 NEAREST (X, S)
    9.3.109 NINT (A [, KIND])
    9.3.110 NOT (I)
    9.3.111 NULL ([MOLD])
    9.3.112 NUMBER_OF_PROCESSORS ([DIM])
    9.3.113 NWORKERS ( )
    9.3.114 PACK (ARRAY, MASK [, VECTOR])
    9.3.115 POPCNT (I)
    9.3.116 POPPAR (I)
    9.3.117 PRECISION (X)
    9.3.118 PRESENT (A)
    9.3.119 PROCESSORS_SHAPE ( )
    9.3.120 PRODUCT (ARRAY [, DIM] [, MASK])
    9.3.121 QCMPLX (X, Y) (VMS, U*X)
    9.3.122 QEXT (A) (VMS, U*X)
    9.3.123 QFLOAT (A) (VMS, U*X)
    9.3.124 QREAL (A) (VMS, U*X)
    9.3.125 RADIX (X)
    9.3.126 RAN (I)
    9.3.127 RANDOM_NUMBER (HARVEST)
    9.3.128 RANDOM_SEED ([SIZE] [, PUT] [, GET])
    9.3.129 RANDU (I1, I2, X)
    9.3.130 RANGE (X)
    9.3.131 REAL (A [, KIND])
    9.3.132 REPEAT (STRING, NCOPIES)
    9.3.133 RESHAPE (SOURCE, SHAPE [, PAD] [, ORDER])
    9.3.134 RRSPACING (X)
    9.3.135 SCALE (X, I)
    9.3.136 SCAN (STRING, SET [, BACK] [, KIND])
    9.3.137 SECNDS (X)
    9.3.138 SELECTED_INT_KIND (R)
    9.3.139 SELECTED_REAL_KIND ([P] [, R])
    9.3.140 SET_EXPONENT (X, I)
    9.3.141 SHAPE (SOURCE [, KIND])
    9.3.142 SIGN (A, B)
    9.3.143 SIN (X)
    9.3.144 SIND (X)
    9.3.145 SINH (X)
    9.3.146 SIZE (ARRAY [, DIM] [, KIND])
    9.3.147 SIZEOF (X)
    9.3.148 SPACING (X)
    9.3.149 SPREAD (SOURCE, DIM, NCOPIES)
    9.3.150 SQRT (X)
    9.3.151 SUM (ARRAY [, DIM] [, MASK])
    9.3.152 SYSTEM_CLOCK ([COUNT] [, COUNT_RATE] [, COUNT_MAX])
    9.3.153 TAN (X)
    9.3.154 TAND (X)
    9.3.155 TANH (X)
    9.3.156 TIME (BUF)
    9.3.157 TINY (X)
    9.3.158 TRAILZ (I)
    9.3.159 TRANSFER (SOURCE, MOLD [, SIZE])
    9.3.160 TRANSPOSE (MATRIX)
    9.3.161 TRIM (STRING)
    9.3.162 UBOUND (ARRAY [, DIM] [, KIND])
    9.3.163 UNPACK (VECTOR, MASK, FIELD)
    9.3.164 VERIFY (STRING, SET [, BACK] [, KIND])
    9.3.165 ZEXT (X)

10 Data Transfer I/O Statements

  10.1 Records and Files
  10.2 Components of Data Transfer Statements
    10.2.1 I/O Control List
      10.2.1.1 Unit Specifier
      10.2.1.2 Format Specifier
      10.2.1.3 Namelist Specifier
      10.2.1.4 Record Specifier
      10.2.1.5 Key-Field-Value Specifier (VMS only)
      10.2.1.6 Key-of-Reference Specifier (VMS only)
      10.2.1.7 I/O Status Specifier
      10.2.1.8 Branch Specifiers
      10.2.1.9 Advance Specifier
      10.2.1.10 Character Count Specifier
    10.2.2 I/O Lists
      10.2.2.1 Simple List Items in I/O Lists
      10.2.2.2 Implied-Do Lists in I/O Lists
  10.3 READ Statements
    10.3.1 Forms for Sequential READ Statements
      10.3.1.1 Rules for Formatted Sequential READ Statements
      10.3.1.2 Rules for List-Directed Sequential READ Statements
      10.3.1.3 Rules for Namelist Sequential READ Statements
      10.3.1.4 Rules for Unformatted Sequential READ Statements
    10.3.2 Forms for Direct-Access READ Statements
      10.3.2.1 Rules for Formatted Direct-Access READ Statements
      10.3.2.2 Rules for Unformatted Direct-Access READ Statements
    10.3.3 Forms for Indexed READ Statements (VMS only)
      10.3.3.1 Rules for Formatted Indexed READ Statements (VMS only)
      10.3.3.2 Rules for Unformatted Indexed READ Statements (VMS only)
    10.3.4 Forms and Rules for Internal READ Statements
  10.4 ACCEPT Statement
  10.5 WRITE Statements
    10.5.1 Forms for Sequential WRITE Statements
      10.5.1.1 Rules for Formatted Sequential WRITE Statements
      10.5.1.2 Rules for List-Directed Sequential WRITE Statements
      10.5.1.3 Rules for Namelist Sequential WRITE Statements
      10.5.1.4 Rules for Unformatted Sequential WRITE Statements
    10.5.2 Forms for Direct-Access WRITE Statements
      10.5.2.1 Rules for Formatted Direct-Access WRITE Statements
      10.5.2.2 Rules for Unformatted Direct-Access WRITE Statements
    10.5.3 Forms for Indexed WRITE Statements (VMS only)
      10.5.3.1 Rules for Formatted Indexed WRITE Statements (VMS only)
      10.5.3.2 Rules for Unformatted Indexed WRITE Statements (VMS only)
    10.5.4 Forms and Rules for Internal WRITE Statements
  10.6 PRINT and TYPE Statements
  10.7 REWRITE Statement

11 I/O Formatting

  11.1 Format Specifications
  11.2 Data Edit Descriptors
    11.2.1 Forms for Data Edit Descriptors
    11.2.2 General Rules for Numeric Editing
    11.2.3 Integer Editing
      11.2.3.1 I Editing
      11.2.3.2 B Editing
      11.2.3.3 O Editing
      11.2.3.4 Z Editing
    11.2.4 Real and Complex Editing
      11.2.4.1 F Editing
      11.2.4.2 E and D Editing
      11.2.4.3 EN Editing
      11.2.4.4 ES Editing
      11.2.4.5 G Editing
      11.2.4.6 Complex Editing
    11.2.5 Logical Editing (L)
    11.2.6 Character Editing (A)
    11.2.7 Default Widths for Data Edit Descriptors
    11.2.8 Terminating Short Fields of Input Data
  11.3 Control Edit Descriptors
    11.3.1 Forms for Control Edit Descriptors
    11.3.2 Positional Editing
      11.3.2.1 T Editing
      11.3.2.2 TL Editing
      11.3.2.3 TR Editing
      11.3.2.4 X Editing
    11.3.3 Sign Editing
      11.3.3.1 SP Editing
      11.3.3.2 SS Editing
      11.3.3.3 S Editing
    11.3.4 Blank Editing
      11.3.4.1 BN Editing
      11.3.4.2 BZ Editing
    11.3.5 Scale Factor Editing (P)
    11.3.6 Slash Editing (/)
    11.3.7 Colon Editing (:)
    11.3.8 Dollar Sign ($) and Backslash (\) Editing
    11.3.9 Character Count Editing (Q)
  11.4 Character String Edit Descriptors
    11.4.1 Character Constant Editing
    11.4.2 H Editing
  11.5 Nested and Group Repeat Specifications
  11.6 Variable Format Expressions
  11.7 Printing of Formatted Records
  11.8 Interaction Between Format Specifications and I/O Lists

12 File Operation I/O Statements on OpenVMS Systems

  12.1 BACKSPACE Statement
  12.2 CLOSE Statement
  12.3 DELETE Statement
  12.4 ENDFILE Statement
  12.5 INQUIRE Statement
    12.5.1 ACCESS Specifier
    12.5.2 ACTION Specifier
    12.5.3 BLANK Specifier
    12.5.4 BLOCKSIZE Specifier
    12.5.5 BUFFERED Specifier
    12.5.6 CARRIAGECONTROL Specifier
    12.5.7 CONVERT Specifier
    12.5.8 DELIM Specifier
    12.5.9 DIRECT Specifier
    12.5.10 EXIST Specifier
    12.5.11 FORM Specifier
    12.5.12 FORMATTED Specifier
    12.5.13 KEYED Specifier
    12.5.14 NAME Specifier
    12.5.15 NAMED Specifier
    12.5.16 NEXTREC Specifier
    12.5.17 NUMBER Specifier
    12.5.18 OPENED Specifier
    12.5.19 ORGANIZATION Specifier
    12.5.20 PAD Specifier
    12.5.21 POSITION Specifier
    12.5.22 READ Specifier
    12.5.23 READWRITE Specifier
    12.5.24 RECL Specifier
    12.5.25 RECORDTYPE Specifier
    12.5.26 SEQUENTIAL Specifier
    12.5.27 UNFORMATTED Specifier
    12.5.28 WRITE Specifier
  12.6 OPEN Statement
    12.6.1 ACCESS Specifier
    12.6.2 ACTION Specifier
    12.6.3 ASSOCIATEVARIABLE Specifier
    12.6.4 BLANK Specifier
    12.6.5 BLOCKSIZE Specifier
    12.6.6 BUFFERCOUNT Specifier
    12.6.7 BUFFERED Specifier
    12.6.8 CARRIAGECONTROL Specifier
    12.6.9 CONVERT Specifier
    12.6.10 DEFAULTFILE Specifier
    12.6.11 DELIM Specifier
    12.6.12 DISPOSE Specifier
    12.6.13 EXTENDSIZE Specifier
    12.6.14 FILE Specifier
    12.6.15 FORM Specifier
    12.6.16 INITIALSIZE Specifier
    12.6.17 KEY Specifier
    12.6.18 MAXREC Specifier
    12.6.19 NAME Specifier
    12.6.20 NOSPANBLOCKS Specifier
    12.6.21 ORGANIZATION Specifier
    12.6.22 PAD Specifier
    12.6.23 POSITION Specifier
    12.6.24 READONLY Specifier
    12.6.25 RECL Specifier
    12.6.26 RECORDSIZE Specifier
    12.6.27 RECORDTYPE Specifier
    12.6.28 SHARED Specifier
    12.6.29 STATUS Specifier
    12.6.30 TYPE Specifier
    12.6.31 USEROPEN Specifier
  12.7 REWIND Statement
  12.8 UNLOCK Statement

13 File Operation I/O Statements on Tru64 UNIX, Linux, and Windows Systems

  13.1 BACKSPACE Statement
  13.2 CLOSE Statement
  13.3 DELETE Statement
  13.4 ENDFILE Statement
  13.5 INQUIRE Statement
    13.5.1 ACCESS Specifier
    13.5.2 ACTION Specifier
    13.5.3 BINARY Specifier (WNT, W9*)
    13.5.4 BLANK Specifier
    13.5.5 BLOCKSIZE Specifier
    13.5.6 BUFFERED Specifier
    13.5.7 CARRIAGECONTROL Specifier
    13.5.8 CONVERT Specifier
    13.5.9 DELIM Specifier
    13.5.10 DIRECT Specifier
    13.5.11 EXIST Specifier
    13.5.12 FORM Specifier
    13.5.13 FORMATTED Specifier
    13.5.14 IOFOCUS Specifier (WNT, W9*)
    13.5.15 MODE Specifier (WNT, W9*)
    13.5.16 NAME Specifier
    13.5.17 NAMED Specifier
    13.5.18 NEXTREC Specifier
    13.5.19 NUMBER Specifier
    13.5.20 OPENED Specifier
    13.5.21 ORGANIZATION Specifier
    13.5.22 PAD Specifier
    13.5.23 POSITION Specifier
    13.5.24 READ Specifier
    13.5.25 READWRITE Specifier
    13.5.26 RECL Specifier
    13.5.27 RECORDTYPE Specifier
    13.5.28 SEQUENTIAL Specifier
    13.5.29 SHARE Specifier (WNT, W9*)
    13.5.30 UNFORMATTED Specifier
    13.5.31 WRITE Specifier
  13.6 OPEN Statement
    13.6.1 ACCESS Specifier
    13.6.2 ACTION Specifier
    13.6.3 ASSOCIATEVARIABLE Specifier
    13.6.4 BLANK Specifier
    13.6.5 BLOCKSIZE Specifier
    13.6.6 BUFFERCOUNT Specifier
    13.6.7 BUFFERED Specifier
    13.6.8 CARRIAGECONTROL Specifier
    13.6.9 CONVERT Specifier
    13.6.10 DEFAULTFILE Specifier
    13.6.11 DELIM Specifier
    13.6.12 DISPOSE Specifier
    13.6.13 FILE Specifier
    13.6.14 FORM Specifier
    13.6.15 IOFOCUS Specifier (WNT, W9*)
    13.6.16 MAXREC Specifier
    13.6.17 MODE Specifier (WNT, W9*)
    13.6.18 NAME Specifier
    13.6.19 ORGANIZATION Specifier
    13.6.20 PAD Specifier
    13.6.21 POSITION Specifier
    13.6.22 READONLY Specifier
    13.6.23 RECL Specifier
    13.6.24 RECORDSIZE Specifier
    13.6.25 RECORDTYPE Specifier
    13.6.26 SHARE Specifier (WNT, W9*)
    13.6.27 SHARED Specifier
    13.6.28 STATUS Specifier
    13.6.29 TITLE Specifier (WNT, W9*)
    13.6.30 TYPE Specifier
    13.6.31 USEROPEN Specifier
  13.7 REWIND Statement
  13.8 UNLOCK Statement

14 Compilation Control Statements

  14.1 INCLUDE Statement
  14.2 OPTIONS Statement

15 Compiler Directives

  15.1 General Directives
    15.1.1 Syntax Rules for General Directives
    15.1.2 ALIAS Directive
    15.1.3 ATTRIBUTES Directive
    15.1.4 DECLARE or NODECLARE Directives
    15.1.5 DEFINE and UNDEFINE Directives
    15.1.6 FIXEDFORMLINESIZE Directive
    15.1.7 FREEFORM and NOFREEFORM Directives
    15.1.8 IDENT Directive
    15.1.9 IF and IF DEFINED Directives
    15.1.10 INTEGER Directive
    15.1.11 IVDEP Directive
    15.1.12 MESSAGE Directive
    15.1.13 OBJCOMMENT Directive
    15.1.14 OPTIONS Directive
    15.1.15 PACK Directive
    15.1.16 PSECT Directive
    15.1.17 REAL Directive
    15.1.18 STRICT and NOSTRICT Directives
    15.1.19 TITLE and SUBTITLE Directives
    15.1.20 UNROLL Directive
  15.2 Parallel Directives for Tru64 UNIX Systems
    15.2.1 Syntax Rules for Parallel Directives (TU*X only)
    15.2.2 Data Scope Attribute Clauses (TU*X only)
      15.2.2.1 COPYIN Clause (TU*X only)
      15.2.2.2 DEFAULT Clause (TU*X only)
      15.2.2.3 FIRSTPRIVATE Clause (TU*X only)
      15.2.2.4 LASTPRIVATE Clause (TU*X only)
      15.2.2.5 PRIVATE Clause (TU*X only)
      15.2.2.6 REDUCTION Clause (TU*X only)
      15.2.2.7 SHARED Clause (TU*X only)
    15.2.3 OpenMP Fortran API Compiler Directives (TU*X only)
      15.2.3.1 Conditional Compilation Rules (TU*X only)
      15.2.3.2 ATOMIC Directive (TU*X only)
      15.2.3.3 BARRIER Directive (TU*X only)
      15.2.3.4 CRITICAL Directive (TU*X only)
      15.2.3.5 DO Directive (TU*X only)
      15.2.3.6 FLUSH Directive (TU*X only)
      15.2.3.7 MASTER Directive (TU*X only)
      15.2.3.8 ORDERED Directive (TU*X only)
      15.2.3.9 PARALLEL Directive (TU*X only)
      15.2.3.10 PARALLEL DO Directive (TU*X only)
      15.2.3.11 PARALLEL SECTIONS Directive (TU*X only)
      15.2.3.12 SECTIONS Directive (TU*X only)
      15.2.3.13 SINGLE Directive (TU*X only)
      15.2.3.14 THREADPRIVATE Directive (TU*X only)
      15.2.3.15 Nesting and Binding Rules (TU*X only)
    15.2.4 Compaq Fortran Parallel Compiler Directives (TU*X only)
      15.2.4.1 BARRIER Directive (TU*X only)
      15.2.4.2 CHUNK Directive (TU*X only)
      15.2.4.3 COPYIN Directive (TU*X only)
      15.2.4.4 CRITICAL SECTION Directive (TU*X only)
      15.2.4.5 INSTANCE Directive (TU*X only)
      15.2.4.6 MP_SCHEDTYPE Directive (TU*X only)
      15.2.4.7 PARALLEL Directive (TU*X only)
      15.2.4.8 PARALLEL DO Directive (TU*X only)
      15.2.4.9 PARALLEL SECTIONS Directive (TU*X only)
      15.2.4.10 PDO Directive (TU*X only)
      15.2.4.11 PDONE Directive (TU*X only)
      15.2.4.12 PSECTIONS Directive (TU*X only)
      15.2.4.13 SINGLE PROCESS Directive (TU*X only)
      15.2.4.14 TASKCOMMON Directive (TU*X only)
  15.3 High Performance Fortran Directives for Tru64 UNIX Systems
    15.3.1 Syntax Rules for HPF Directives (TU*X only)
    15.3.2 ALIGN Directive (TU*X only)
    15.3.3 DISTRIBUTE Directive (TU*X only)
    15.3.4 INDEPENDENT Directive (TU*X only)
    15.3.5 INHERIT Directive (TU*X only)
    15.3.6 PROCESSORS Directive (TU*X only)
    15.3.7 [NO]SEQUENCE Directive (TU*X only)
    15.3.8 SHADOW Directive (TU*X only)
    15.3.9 TEMPLATE Directive (TU*X only)

16 Scope and Association

  16.1 Scope
  16.2 Unambiguous Generic Procedure References
  16.3 Resolving Procedure References
    16.3.1 References to Generic Names
    16.3.2 References to Specific Names
    16.3.3 References to Nonestablished Names
  16.4 Association
    16.4.1 Name Association
      16.4.1.1 Argument Association
      16.4.1.2 Use and Host Association
    16.4.2 Pointer Association
    16.4.3 Storage Association
      16.4.3.1 Storage Units and Storage Sequence
      16.4.3.2 Array Association

A Obsolescent and Deleted Language Features

  A.1 Deleted Language Features in Fortran 95
  A.2 Obsolescent Language Features in Fortran 95
  A.3 Obsolescent Language Features in Fortran 90

B Additional Language Features

  B.1 DEFINE FILE Statement
  B.2 The ENCODE and DECODE Statements
  B.3 FIND Statement
  B.4 FORTRAN-66 Interpretation of the EXTERNAL Statement
  B.5 Alternative Syntax for the PARAMETER Statement
  B.6 VIRTUAL Statement
  B.7 Alternative Syntax for Octal and Hexadecimal Constants
  B.8 Alternative Syntax for a Record Specifier
  B.9 Alternative Syntax for the DELETE Statement
  B.10 Alternative Form for Namelist External Records
  B.11 The Compaq Fortran POINTER Statement
  B.12 Record Structures
    B.12.1 Structure Declarations
      B.12.1.1 Type Declarations
      B.12.1.2 Substructure Declarations
      B.12.1.3 Union Declarations
    B.12.2 RECORD Statement
    B.12.3 References to Record Fields
    B.12.4 Aggregate Assignment

C The ASCII and DEC Multinational Character Sets for OpenVMS, Tru64 UNIX, and Linux Systems

  C.1 The ASCII Character Set (VMS, U*X)
  C.2 The DEC Multinational Character Set (VMS, U*X)

D Data Representation Models

  D.1 Model for Integer Data
  D.2 Model for Real Data
  D.3 Model for Bit Data

E Run-Time Library Module Routines on Windows Systems

  E.1 Portability Routines (WNT, W9*)
  E.2 QuickWin Routines (WNT, W9*)
  E.3 Graphics Routines (WNT, W9*)
  E.4 Dialog Routines (WNT, W9*)
  E.5 National Language Support Routines (WNT, W9*)
  E.6 Miscellaneous Run-Time Routines (WNT, W9*)
  E.7 DFCOM Routines (WNT, W9*)
  E.8 DFAUTO Routines (WNT, W9*)
  E.9 SPORT Routines (WNT, W9*)

F Run-Time Library Routines on Tru64 UNIX and Linux Systems

  F.1 General Library Routines (U*X only)
  F.2 Parallel Library Routines (TU*X only)
    F.2.1 OpenMP Fortran API Run-Time Library Routines (TU*X only)
    F.2.2 Parallel Threads Routines for Compatibility (TU*X only)

G High Performance Fortran (HPF) Library Routines on Tru64 UNIX Systems

H Summary of Language Extensions

  H.1 Compaq Fortran Language Extensions
  H.2 High Performance Fortran Language Extensions

Glossary

Index

Examples

  6-1 Allocating Virtual Memory
  8-1 Using and Redefining an Intrinsic Function Name
  11-1 Interaction Between Format Specifications and I/O Lists
  14-1 Including Text from a File
  16-1 Example of Name, Pointer, and Storage Association

Figures

  1-1 Graphic Representation of Compaq Fortran
  2-1 Required Order of Statements
  2-2 Line Formatting Example
  3-1 Array Storage
  5-1 Equivalence of Substrings
  5-2 Equivalence of Character Arrays
  5-3 A Valid Extension of a Common Block
  5-4 An Invalid Extension of a Common Block
  7-1 Flow of Control in CASE Constructs
  7-2 Nested DO Constructs
  7-3 Control Transfers and Extended Range
  7-4 Flow of Control in IF Constructs
  B-1 Memory Map of Structure APPOINTMENT
  B-2 Memory Map of Structure WORDS_LONG
  C-1 Graphic Representation of the ASCII Character Set
  C-2 Graphic Representation of the DEC Multinational Extension to the ASCII Character Set

Tables

  1 Conventions Used in This Manual
  2-1 Statements Restricted in Scoping Units
  2-2 Indicators in Source Forms
  3-1 C-Style Escape Sequences
  4-1 Precedence of Expression Operators
  4-2 Conversion Rules for Numeric Assignment Statements
  5-1 Compatible Attributes
  5-2 Noncharacter Data Types
  5-3 Equivalence of Array Storage
  5-4 Equivalence of Arrays with Nonunity Lower Bounds
  8-1 Defaults for Argument List Functions
  9-1 Functions Not Allowed as Actual Arguments
  9-2 Categories of Intrinsic Functions
  9-3 Summary of Generic Intrinsic Functions
  9-4 Specific Functions with No Generic Association
  9-5 Intrinsic Subroutines
  10-1 Default Formats for List-Directed Output
  11-1 Summary of Edit Descriptors
  11-2 Effect of Data Magnitude on G Format Conversions
  11-3 Size Limits for Noncharacter Data Using A Editing
  11-4 Default Widths for Data Edit Descriptors
  11-5 Control Characters for Printing
  12-1 OPEN Statement Specifiers and Values on OpenVMS Systems
  12-2 Maximum Record Lengths (RECL) on OpenVMS Systems
  12-3 Default Record Lengths (RECL) on OpenVMS Systems
  13-1 OPEN Statement Specifiers and Values on Tru64 UNIX, Linux, and Windows Systems
  13-2 Maximum Record Lengths (RECL) on Tru64 UNIX, Linux, and Windows Systems
  13-3 Default Record Lengths (RECL) on Tru64 UNIX, Linux, and Windows Systems
  15-1 Common Block Defaults and PSECT Modification
  15-2 Initialization Values for REDUCTION Operators and Intrinsics (TU*X only)
  15-3 Categories of OpenMP Fortran Parallel Directives (TU*X only)
  15-4 Categories of Compaq Fortran Parallel Directives (TU*X only)
  16-1 Scope of Program Entities
  16-2 Data Type Storage Requirements
  E-1 Summary of Portability Routines (WNT, W9*)
  E-2 Summary of Quickwin Routines (WNT, W9*)
  E-3 Summary of Graphics Routines (WNT, W9*)
  E-4 Summary of Dialog Routines (WNT, W9*)
  E-5 Summary of NLS Routines (WNT, W9*)
  E-6 Summary of Miscellaneous Run-Time Routines (WNT, W9*)
  E-7 Summary of DFCOM Routines (WNT, W9*)
  E-8 Summary of DFAUTO Routines (WNT, W9*)
  E-9 Summary of SPORT Routines (WNT, W9*)
  F-1 Summary of General Routines (U*X only)
  F-2 Summary of OpenMP Parallel Routines (TU*X only)
  F-3 Summary of Parallel Routines for Compatibility (TU*X only)
  G-1 Summary of Compaq Fortran 3hpf Routines (TU*X only)

(no previous page) Next Page