Compaq Fortran
User Manual for
OpenVMS Alpha Systems



Contents (summary)
Preface Preface
Chapter 1 Getting Started
Chapter 2 Compiling Compaq Fortran Programs
Chapter 3 Linking and Running Compaq Fortran Programs
Chapter 4 Using the OpenVMS Debugger
Chapter 5 Performance: Making Programs Run Faster
Chapter 6 Compaq Fortran Input/Output
Chapter 7 Run-Time Errors
Chapter 8 Data Types and Representation
Chapter 9 Converting Unformatted Numeric Data
Chapter 10 Using Compaq Fortran in the Common Language Environment
Chapter 11 Using OpenVMS Record Management Services
Chapter 12 Using Indexed Files
Chapter 13 Interprocess Communication
Chapter 14 Condition-Handling Facilities
Chapter 15 Using the Compaq Extended Math Library (CXML)
Appendix A Compatibility: Compaq Fortran 77 and Compaq Fortran
Appendix B Diagnostic Messages
Appendix C Compaq Fortran Logical Names
Appendix D Contents of the Compaq Fortran System Library FORSYSDEF
Appendix E Using System Services---Examples
  Index
  Figures
  Examples
  Tables


Contents


Preface
Preface Preface
Chapter 1
1 Getting Started
     1.1     The Compaq Fortran Programming Environment
     1.2     Commands to Create and Run an Executable Program
     1.3     Creating and Running a Program Using a Module and Separate Function
         1.3.1         Commands to Create the Executable Program
         1.3.2         Running the Sample Program
         1.3.3         Debugging the Sample Program
     1.4     Program Development Stages and Tools
Chapter 2
2 Compiling Compaq Fortran Programs
     2.1     Functions of the Compiler
     2.2     The FORTRAN Command
         2.2.1         Specifying Input Files and Source Form
         2.2.2         Specifying Multiple Input Files
         2.2.3         Creating and Using Module Files
             2.2.3.1             Creating Module Files
             2.2.3.2             Using Module Files
         2.2.4         Using Include Files and Include Text Library Modules
             2.2.4.1             Using Include Files and INCLUDE Statement Forms
             2.2.4.2             INCLUDE Statement Forms for Including Text Library Modules
             2.2.4.3             Using Include Text Library Modules for a Specified Library Name
             2.2.4.4             Using Include Text Library Modules for an Unspecified Library Name
         2.2.5         Specifying Output Files
         2.2.6         Examples of the FORTRAN Command
             2.2.6.1             Naming the Object File
             2.2.6.2             Compiler Source Checking Only (No Object File)
             2.2.6.3             Requesting a Listing File and Contents
             2.2.6.4             Compiling Multiple Files
             2.2.6.5             Requesting Additional Compile-Time and Run-Time Checking
             2.2.6.6             Checking Fortran 90 or 95 Standard Conformance
             2.2.6.7             Requesting Additional Optimizations
     2.3     Qualifiers to the FORTRAN Command
         2.3.1         FORTRAN Command Qualifier Syntax
         2.3.2         Summary of FORTRAN Command Qualifiers
         2.3.3         /ALIGNMENT --- Data Alignment
         2.3.4         /ANALYSIS_DATA---Create Analysis Data File
         2.3.5         /ANNOTATIONS --- Code Descriptions
         2.3.6         /ARCHITECTURE --- Architecture Code Instructions
         2.3.7         /ASSUME --- Compiler Assumptions
         2.3.8         /AUTOMATIC --- Data Storage
         2.3.9         /BY_REF_CALL --- Character Literal Argument Passing
         2.3.10         /CCDEFAULT --- Carriage Control for Terminals
         2.3.11         /CHECK --- Generate Code for Run-Time Checking
         2.3.12         /CONVERT --- Unformatted Numeric Data Conversion
         2.3.13         /D_LINES --- Debugging Statement Indicator, Column 1
         2.3.14         /DEBUG --- Object File Traceback and Symbol Table
         2.3.15         /DIAGNOSTICS --- Create Diagnostics File
         2.3.16         /DOUBLE_SIZE --- DOUBLE PRECISION Data Size
         2.3.17         /ERROR_LIMIT --- Limit Compiler Messages
         2.3.18         /EXTEND_SOURCE --- Line Length for Fixed-Form Source
         2.3.19         /F77 --- FORTRAN IV or FORTRAN-77 Compatibility
         2.3.20         /FAST --- Request Fast Run-Time Performance
         2.3.21         /FLOAT --- Specify Floating-Point Format in Memory
         2.3.22         /GRANULARITY --- Control Shared Memory Access to Data
         2.3.23         /IEEE_MODE --- Control IEEE Arithmetic Exception Handling
         2.3.24         /INCLUDE --- Add Directory for INCLUDE and Module File Search
         2.3.25         /INTEGER_SIZE --- Integer and Logical Data Size
         2.3.26         /LIBRARY --- Specify File as Text Library
         2.3.27         /LIST --- Request Listing File
         2.3.28         /MACHINE_CODE --- Request Machine Code in Listing File
         2.3.29         /MATH_LIBRARY --- Fast or Accurate Math Library Routines
         2.3.30         /MODULE --- Placement of Module Files
         2.3.31         /NAMES --- Control Case of External Names
         2.3.32         /OBJECT --- Specify Name or Prevent Object File Creation
         2.3.33         /OLD_F77 --- Use Old FORTRAN 77 Compiler
         2.3.34         /OPTIMIZE --- Specify Compiler Optimizations
         2.3.35         /PAD_SOURCE --- Pad Source Lines with Spaces
         2.3.36         /REAL_SIZE --- Floating-Point Data Size
         2.3.37         /RECURSIVE --- Data Storage and Recursion
         2.3.38         /REENTRANCY --- Specify Threaded or Asynchronous Reentrancy
         2.3.39         /ROUNDING_MODE --- Specify IEEE Floating-Point Rounding Mode
         2.3.40         /SEPARATE_COMPILATION --- Control Compilation Unit Use in Object Files
         2.3.41         /SEVERITY --- Specify Compiler Diagnostic Severity
         2.3.42         /SHOW --- Control Source Content in Listing File
         2.3.43         /SOURCE_FORM --- Fortran 90/95 Source Form
         2.3.44         /STANDARD --- Perform Fortran 90/95 Standards Checking
         2.3.45         /SYNCHRONOUS_EXCEPTIONS --- Report Exceptions More Precisely
         2.3.46         /SYNTAX_ONLY --- Do Not Create Object File
         2.3.47         /VERSION --- Display the Compaq Fortran Version Number
         2.3.48         /TIE --- Enable Code for Shared Translated Images
         2.3.49         /VMS --- Request Compaq Fortran 77 for OpenVMS VAX Compatibility
         2.3.50         /WARNINGS --- Warning Messages and Compiler Checking
     2.4     Using Text Libraries
         2.4.1         Using the LIBRARY Commands
         2.4.2         Naming Text Library Modules
     2.5     Compiler Limits and Messages
         2.5.1         Compiler Limits
         2.5.2         Compiler Diagnostic Messages and Error Conditions
     2.6     Compiler Output Listing Format
         2.6.1         Source Code Section
         2.6.2         Machine Code Section
         2.6.3         Annotations Section
         2.6.4         Storage Map Section
         2.6.5         Compilation Summary Section
Chapter 3
3 Linking and Running Compaq Fortran Programs
     3.1     The LINK Command
         3.1.1         Linker Output File Qualifiers
             3.1.1.1             Image File Qualifiers
             3.1.1.2             The /NATIVE_ONLY Qualifier
             3.1.1.3             Map File Qualifiers
         3.1.2         /DEBUG and /TRACEBACK Qualifiers
         3.1.3         Linker Input File Qualifiers
         3.1.4         Linker Symbol Table Qualifier
         3.1.5         Linker Options File Qualifier
         3.1.6         Other Linker Qualifiers
         3.1.7         Linker Messages
     3.2     Running Compaq Fortran Programs
         3.2.1         The RUN Command
         3.2.2         System Processing at Image Exit
         3.2.3         Interrupting a Program
         3.2.4         Returning Status Values to the Command Interpreter
     3.3     Symbol Table and Traceback Information: Locating Run-Time Errors
         3.3.1         Effects of Error-Related Command Qualifiers
         3.3.2         Sample Source Program and Traceback
Chapter 4
4 Using the OpenVMS Debugger
     4.1     Overview
     4.2     Getting Started with the Debugger
         4.2.1         Compiling and Linking a Program to Prepare for Debugging
         4.2.2         Establishing the Debugging Configuration and Interface
         4.2.3         Invoking the Debugger
         4.2.4         Debugger Commands Used Often
         4.2.5         Debugger Breakpoints, Tracepoints, and Watchpoints
         4.2.6         Ending a Debugging Session
         4.2.7         Notes on Debugger Support for Compaq Fortran
     4.3     Sample Debugging Session
     4.4     Displaying Compaq Fortran Variables
         4.4.1         Accessing Compaq Fortran Common Block Variables
         4.4.2         Accessing Compaq Fortran Derived-Type Variables
         4.4.3         Accessing Compaq Fortran Record Variables
         4.4.4         Accessing Compaq Fortran Array Variables
         4.4.5         Accessing Compaq Fortran Module Variables
     4.5     Debugger Command Summary
         4.5.1         Starting and Terminating a Debugging Session
         4.5.2         Controlling and Monitoring Program Execution
         4.5.3         Examining and Manipulating Data
         4.5.4         Controlling Type Selection and Symbolization
         4.5.5         Controlling Symbol Lookup
         4.5.6         Displaying Source Code
         4.5.7         Using Screen Mode
         4.5.8         Editing Source Code
         4.5.9         Defining Symbols
         4.5.10         Using Keypad Mode
         4.5.11         Using Command Procedures and Log Files
         4.5.12         Using Control Structures
         4.5.13         Additional Commands
     4.6     Locating an Exception
     4.7     Locating Unaligned Data
Chapter 5
5 Performance: Making Programs Run Faster
     5.1     Software Environment and Efficient Compilation
         5.1.1         Install the Latest Version of Compaq Fortran and Performance Products
         5.1.2         Compile Using Multiple Source Files and Appropriate FORTRAN Qualifiers
         5.1.3         Process Environment and Related Influences on Performance
     5.2     Analyze Program Performance
         5.2.1         Measuring Performance Using LIB$xxxx_TIMER Routines or Command Procedures
             5.2.1.1             The LIB$xxxx_TIMER Routines
             5.2.1.2             Using a Command Procedure
         5.2.2         The Performance and Coverage Analyzer (PCA)
     5.3     Data Alignment Considerations
         5.3.1         Causes of Unaligned Data and Ensuring Natural Alignment
         5.3.2         Checking for Inefficient Unaligned Data
         5.3.3         Ordering Data Declarations to Avoid Unaligned Data
             5.3.3.1             Arranging Data Items in Common Blocks
             5.3.3.2             Arranging Data Items in Derived-Type Data
             5.3.3.3             Arranging Data Items in Compaq Fortran 77 Record Structures
         5.3.4         Qualifiers Controlling Alignment
     5.4     Use Arrays Efficiently
         5.4.1         Accessing Arrays Efficiently
         5.4.2         Passing Array Arguments Efficiently
     5.5     Improve Overall I/O Performance
         5.5.1         Use Unformatted Files Instead of Formatted Files
         5.5.2         Write Whole Arrays or Strings
         5.5.3         Write Array Data in the Natural Storage Order
         5.5.4         Use Memory for Intermediate Results
         5.5.5         Defaults for Blocksize and Buffer Count
         5.5.6         Specify RECL
         5.5.7         Use the Optimal Record Type
         5.5.8         Enable Implied-DO Loop Collapsing
         5.5.9         Use of Variable Format Expressions
     5.6     Additional Source Code Guidelines for Run-Time Efficiency
         5.6.1         Avoid Small Integer and Small Logical Data Items
         5.6.2         Avoid Mixed Data Type Arithmetic Expressions
         5.6.3         Use Efficient Data Types
         5.6.4         Avoid Using Slow Arithmetic Operators
         5.6.5         Avoid EQUIVALENCE Statement Use
         5.6.6         Use Statement Functions and Internal Subprograms
         5.6.7         Code DO Loops for Efficiency
     5.7     Optimization Levels: the /OPTIMIZE=LEVEL=n qualifier
         5.7.1         Optimizations Performed at All Optimization Levels
         5.7.2         Local (Minimal) Optimizations
             5.7.2.1             Common Subexpression Elimination
             5.7.2.2             Integer Multiplication and Division Expansion
             5.7.2.3             Compile-Time Operations
             5.7.2.4             Value Propagation
             5.7.2.5             Dead Store Elimination
             5.7.2.6             Register Usage
             5.7.2.7             Mixed Real/Complex Operations
         5.7.3         Global Optimizations
         5.7.4         Additional Global Optimizations
             5.7.4.1             Loop Unrolling
             5.7.4.2             Code Replication to Eliminate Branches
         5.7.5         Automatic Inlining and Software Pipelining
             5.7.5.1             Interprocedure Analysis
             5.7.5.2             Inlining Procedures
             5.7.5.3             Software Pipelining
         5.7.6         Loop Transformation
     5.8     Other Qualifiers Related to Optimization
         5.8.1         Loop Transformation
         5.8.2         Software Pipelining
         5.8.3         Setting Multiple Qualifiers with the /FAST Qualifier
         5.8.4         Controlling Loop Unrolling
         5.8.5         Controlling the Inlining of Procedures
         5.8.6         Requesting Optimized Code for a Specific Processor Generation
         5.8.7         Requesting Generated Code for a Specific Processor Generation
         5.8.8         Arithmetic Reordering Optimizations
         5.8.9         Dummy Aliasing Assumption
     5.9     Compiler Directives Related to Performance
         5.9.1         Using the cDEC$ OPTIONS Directive
         5.9.2         Using the cDEC$ UNROLL Directive to Control Loop Unrolling
         5.9.3         Using the cDEC$ IVDEP Directive to Control Certain Loop Optimizations
Chapter 6
6 Compaq Fortran Input/Output
     6.1     Logical I/O Units
     6.2     Types of I/O Statements
     6.3     Forms of I/O Statements
     6.4     Types of Files and File Characteristics
         6.4.1         File Organizations
         6.4.2         Internal Files and Scratch Files
         6.4.3         I/O Record Types
             6.4.3.1             Portability Considerations of Record Types
             6.4.3.2             Fixed-Length Records
             6.4.3.3             Variable-Length Records
             6.4.3.4             Segmented Records
             6.4.3.5             Stream Records
             6.4.3.6             Stream_CR and Stream_LF Records
         6.4.4         Other File Characteristics
     6.5     Opening Files and the OPEN Statement
         6.5.1         Preconnected Files and Fortran Logical Names
             6.5.1.1             Preconnected Files
             6.5.1.2             Compaq Fortran Logical Names
         6.5.2         Disk Files and File Specifications
         6.5.3         OPEN Statement Specifiers
     6.6     Obtaining File Information: The INQUIRE Statement
         6.6.1         Inquiry by Unit
         6.6.2         Inquiry by File Name
         6.6.3         Inquiry by Output Item List
     6.7     Closing a File: The CLOSE Statement
     6.8     Record Operations
         6.8.1         Record I/O Statement Specifiers
         6.8.2         Record Access Modes
             6.8.2.1             Sequential Access
             6.8.2.2             Direct Access
             6.8.2.3             Keyed Access
         6.8.3         Shared File Use
         6.8.4         Specifying the Initial Record Position
         6.8.5         Advancing and Nonadvancing Record I/O
         6.8.6         Record Transfer
     6.9     Output Data Buffering and RMS Journaling
Chapter 7
7 Run-Time Errors
     7.1     Compaq Fortran RTL Default Error Processing
         7.1.1         Run-Time Message Format
         7.1.2         Run-Time Message Severity Levels
     7.2     Handling Errors
         7.2.1         Using the ERR, EOR, and END Branch Specifiers
         7.2.2         Using the IOSTAT Specifier
     7.3     List of Run-Time Messages
Chapter 8
8 Data Types and Representation
     8.1     Summary of Data Types and Characteristics
     8.2     Integer Data Representations
         8.2.1         Integer Declarations and FORTRAN Command Qualifiers
         8.2.2         INTEGER (KIND=1) or INTEGER*1 Representation
         8.2.3         INTEGER (KIND=2) or INTEGER*2 Representation
         8.2.4         INTEGER (KIND=4) or INTEGER*4 Representation
         8.2.5         INTEGER (KIND=8) or INTEGER*8 Representation
     8.3     Logical Data Representations
     8.4     Native Floating-Point Representations and IEEE Exceptional Values
         8.4.1         REAL, COMPLEX, and DOUBLE PRECISION Declarations and FORTRAN Qualifiers
         8.4.2         REAL (KIND=4) or REAL*4 Representations
             8.4.2.1             IEEE S_float Representation
             8.4.2.2             VAX F_float Representation
         8.4.3         REAL (KIND=8) or REAL*8 Representations
             8.4.3.1             IEEE T_float Representation
             8.4.3.2             VAX G_float Representation
             8.4.3.3             VAX D_float Representation
         8.4.4         REAL (KIND=16) or REAL*16 X_float Representation
         8.4.5         COMPLEX (KIND=4) or COMPLEX*8 Representations
         8.4.6         COMPLEX (KIND=8) or COMPLEX*16 Representations
         8.4.7         COMPLEX (KIND=16) or COMPLEX*32 Representation
         8.4.8         Exceptional IEEE Floating-Point Representations
     8.5     Character Representation
     8.6     Hollerith Representation
Chapter 9
9 Converting Unformatted Numeric Data
     9.1     Endian Order of Numeric Formats
     9.2     Native and Supported Nonnative Numeric Formats
     9.3     Limitations of Numeric Conversion
     9.4     Methods of Specifying the Unformatted Numeric Format
         9.4.1         Logical Name FOR$CONVERTnnn Method
         9.4.2         Logical Name FOR$CONVERT.ext (and FOR$CONVERT_ext) Method
         9.4.3         OPEN Statement CONVERT='keyword' Method
         9.4.4         OPTIONS Statement /CONVERT=keyword Method
         9.4.5         FORTRAN Command /CONVERT=keyword Qualifier Method
         9.4.6         Additional Notes on Nonnative Data
Chapter 10
10 Using Compaq Fortran in the Common Language Environment
     10.1     Compaq Fortran Procedures and Argument Passing
         10.1.1         Explicit and Implicit Interfaces
         10.1.2         Types of Compaq Fortran Subprograms
         10.1.3         Using Procedure Interface Blocks
         10.1.4         Passing Arguments and Function Return Values
         10.1.5         Passing Arrays as Arguments
         10.1.6         Passing Pointers as Arguments
         10.1.7         Compaq Fortran Array Descriptor Format
     10.2     Argument-Passing Mechanisms and Built-In Functions
         10.2.1         Passing Arguments by Descriptor---%DESCR Function
         10.2.2         Passing Addresses---%LOC Function
         10.2.3         Passing Arguments by Immediate Value---%VAL Function
         10.2.4         Passing Arguments by Reference---%REF Function
         10.2.5         Examples of Argument Passing Built-in Functions
     10.3     Using the cDEC$ ALIAS and cDEC$ ATTRIBUTES Directives
         10.3.1         The cDEC$ ALIAS Directive
         10.3.2         The cDEC$ ATTRIBUTES Directive
             10.3.2.1             C Property
             10.3.2.2             ALIAS Property
             10.3.2.3             REFERENCE and VALUE Properties
             10.3.2.4             EXTERN and VARYING Properties
             10.3.2.5             ADDRESS64 Property
     10.4     OpenVMS Procedure-Calling Standard
         10.4.1         Register and Stack Usage
         10.4.2         Return Values of Procedures
         10.4.3         Argument Lists
     10.5     OpenVMS System Routines
         10.5.1         OpenVMS Run-Time Library Routines
         10.5.2         OpenVMS System Services Routines
     10.6     Calling Routines---General Considerations
     10.7     Calling OpenVMS System Services
         10.7.1         Obtaining Values for System Symbols
         10.7.2         Calling System Services by Function Reference
         10.7.3         Calling System Services as Subroutines
         10.7.4         Passing Arguments to System Services
             10.7.4.1             Immediate Value Arguments
             10.7.4.2             Address Arguments
             10.7.4.3             Descriptor Arguments
             10.7.4.4             Data Structure Arguments
             10.7.4.5             Examples of Passing Arguments
     10.8     Calling Between Compaq Fortran 77 and Compaq Fortran
         10.8.1         Argument Passing and Function Return Values
         10.8.2         Using Data Items in Common Blocks
         10.8.3         I/O to the Same Unit Number
     10.9     Calling Between Compaq Fortran and Compaq C
         10.9.1         Compiling and Linking Files
         10.9.2         Procedures and External Names
         10.9.3         Invoking a C Function from Compaq Fortran
         10.9.4         Invoking a Compaq Fortran Function or Subroutine from C
         10.9.5         Equivalent Data Types for Function Return Values
         10.9.6         Argument Association and Equivalent Data Types
             10.9.6.1             Compaq Fortran Intrinsic Data Types
             10.9.6.2             Equivalent Compaq Fortran and C Data Types
         10.9.7         Example of Passing Integer Data to C Functions
         10.9.8         Example of Passing Complex Data to C Functions
         10.9.9         Handling User-Defined Structures
         10.9.10         Handling Scalar Pointer Data
         10.9.11         Handling Arrays
         10.9.12         Handling Common Blocks of Data
Chapter 11
11 Using OpenVMS Record Management Services
     11.1     RMS Data Structures
         11.1.1         Using FORSYSDEF Library Modules to Manipulate RMS Data Structures
         11.1.2         The File Access Block
         11.1.3         The Record Access Block
         11.1.4         The Name Block
         11.1.5         Extended Attributes Blocks
     11.2     RMS Services
         11.2.1         Declaring RMS System Service Names
         11.2.2         Arguments to RMS Services
         11.2.3         Checking Status from RMS Services
         11.2.4         Opening a File
         11.2.5         Closing a File
         11.2.6         Writing Data
         11.2.7         Reading Data
         11.2.8         Other Services
     11.3     User-Written Open Procedures
         11.3.1         Examples of USEROPEN Routines
         11.3.2         RMS Control Structures
     11.4     Example of Block Mode I/O
         11.4.1         Main Block Mode I/O Program---BIO
         11.4.2         Block Mode I/O USEROPEN Functions---BIOCREATE and BIOREAD
             11.4.2.1             OUTPUT Routine
             11.4.2.2             INPUT Routine
Chapter 12
12 Using Indexed Files
     12.1     Creating an Indexed File
     12.2     Writing Indexed Files
         12.2.1         Duplicate Values in Key Fields
         12.2.2         Preventing the Indexing of Alternate Key Fields
     12.3     Reading Indexed Files
     12.4     Updating Records
     12.5     Deleting Records
     12.6     Current Record and Next Record Pointers
     12.7     Exception Conditions
Chapter 13
13 Interprocess Communication
     13.1     Compaq Fortran Program Section Usage
     13.2     Local Processes---Sharing and Exchanging Data
         13.2.1         Sharing Images in Shareable Image Libraries
         13.2.2         Sharing Data in Installed Common Areas
             13.2.2.1             Creating and Installing the Shareable Image Common Area
             13.2.2.2             Creating Programs to Access the Shareable Image Common Area
             13.2.2.3             Synchronizing Access
         13.2.3         Creating and Using Mailboxes to Pass Information
             13.2.3.1             Creating a Mailbox
             13.2.3.2             Sending and Receiving Data Using Mailboxes
     13.3     Remote Processes---Sharing and Exchanging Data
         13.3.1         Remote File Access
         13.3.2         Network Task-to-Task Communication
Chapter 14
14 Condition-Handling Facilities
     14.1     Overview of the Condition-Handling Facility
     14.2     Default Condition Handler
     14.3     User-Program Interactions with the CHF
         14.3.1         Establishing and Removing Condition Handlers
         14.3.2         Signaling a Condition
         14.3.3         Condition Values and Symbols Passed to CHF
     14.4     Operations Performed in Condition Handlers
     14.5     Coding Requirements of Condition Handlers
     14.6     Returning from a Condition Handler
     14.7     Matching Condition Values to Determine Program Behavior
     14.8     Changing a Signal to a Return Status
     14.9     Changing a Signal to a Stop
     14.10     Checking for Arithmetic Exceptions
     14.11     Checking for Data Alignment Traps
     14.12     Condition Handler Example
Chapter 15
15 Using the Compaq Extended Math Library (CXML)
     15.1     CXML Routine Groups
     15.2     Using CXML from Fortran
     15.3     CXML Program Example
Appendix A
Appendix A Compatibility: Compaq Fortran 77 and Compaq Fortran
     A.1     Compaq Fortran and Compaq Fortran 77 Compatibility on Various Platforms
     A.2     Major Language Features for Compatibility with Compaq Fortran 77 for OpenVMS Systems
     A.3     Language Features and Interpretation Differences Between Compaq Fortran 77 and Compaq Fortran on OpenVMS Systems
         A.3.1         Compaq Fortran 77 for OpenVMS Language Features Not Implemented
         A.3.2         Compaq Fortran 77 for OpenVMS VAX Systems Language Features Not Implemented
         A.3.3         Compaq Fortran 77 for OpenVMS Language Interpretation Differences
         A.3.4         Compaq Fortran 77 for OpenVMS VAX Systems Interpretation Differences
     A.4     Improved Compaq Fortran Compiler Diagnostic Detection
     A.5     Compiler Command-Line Differences
         A.5.1         Qualifiers Not Available on OpenVMS VAX Systems
         A.5.2         Qualifiers Specific to Compaq Fortran 77 for OpenVMS VAX Systems
     A.6     Interoperability with Translated Shared Images
     A.7     Porting Compaq Fortran 77 for OpenVMS VAX Systems Data
     A.8     VAX H_float Representation
Appendix B
Appendix B Diagnostic Messages
     B.1     Diagnostic Messages from the Compaq Fortran Compiler
         B.1.1         Source Program Diagnostic Messages
         B.1.2         Compiler-Fatal Diagnostic Messages
     B.2     Messages from the Compaq Fortran Run-Time System
Appendix C
Appendix C Compaq Fortran Logical Names
     C.1     Commands for Assigning and Deassigning Logical Names
     C.2     Compile-Time Logical Names
     C.3     Run-Time Logical Names
Appendix D
Appendix D Contents of the Compaq Fortran System Library FORSYSDEF
Appendix E
Appendix E Using System Services---Examples
     E.1     Calling RMS Procedures
     E.2     Using an AST Routine
     E.3     Accessing Devices Using Synchronous I/O
     E.4     Communicating with Other Processes
     E.5     Sharing Data
     E.6     Displaying Data at Terminals
     E.7     Creating, Accessing, and Ordering Files
     E.8     Measuring and Improving Performance
     E.9     Accessing Help Libraries
     E.10     Creating and Managing Other Processes
Index
Index
Examples
1-1 Sample Main Program
1-2 Sample Main Program That Uses a Module and Separate Function
1-3 Sample Module
1-4 Sample Separate Function Declaration
2-1 Sample Listing of Source Code
2-2 Sample Listing of Machine Code (Partial Listing)
2-3 Sample Listing of Annotations (Partial Listing)
2-4 Sample Storage Map Section
2-5 Sample Compilation Summary
3-1 Sample Compaq Fortran Program
4-1 Sample Program SQUARES
4-2 Sample Debugging Session Using Program SQUARES
5-1 Measuring Program Performance Using LIB$SHOW_TIMER and LIB$INIT_TIMER
5-2 Command Procedure that Measures Program Performance
5-3 Using the /ASSUME =DUMMY_ALIASES Qualifier
7-1 Handling OPEN Statement File Name Errors
8-1 Testing for a NaN Value
10-1 Calling C Functions and Passing Integer Arguments
10-2 Calling C Functions and Passing Integer Arguments
10-3 Use of LIB$GET_VM and POINTER
10-4 Subroutine Using a Data Structure Argument
10-5 Ctrl/C Trapping Example
10-6 Compaq Fortran Program Calling a Compaq Fortran 77 Subroutine
10-7 Compaq Fortran 77 Subroutine Called by a Compaq Fortran Program
10-8 C Functions Called by a Compaq Fortran Program
10-9 Calling C Functions and Passing Integer Arguments
10-10 Calling C Functions and Passing Complex Arguments
10-11 Calling C Functions and Passing Pointer Arguments
10-12 C Functions Receiving Pointer Arguments
10-13 C Function That Receives an Explicit-Shape Array
10-14 Compaq Fortran Program That Passes an Explicit-Shape Array
A-1 Using the CVT$CONVERT_FLOAT Routine
B-1 Sample Diagnostic Messages (Listing Format)
Figures
2-1 Specifying the Format of Numeric Data for Unformatted Files
2-2 Creating and Using a Text Library
5-1 Common Block with Unaligned Data
5-2 Common Block with Naturally Aligned Data
5-3 Common Block with Naturally Aligned Reordered Data
5-4 Derived-Type Naturally Aligned Data (in CATALOG_SPRING : ( ,))
5-5 Memory Diagram of REC for Naturally Aligned Records
6-1 Segmented Records
6-2 Stream_CR and Stream_LF Records
8-1 INTEGER (KIND=1) or INTEGER*1 Representation
8-2 INTEGER (KIND=2) or INTEGER*2 Representation
8-3 INTEGER (KIND=4) or INTEGER*4 Representation
8-4 INTEGER (KIND=8) or INTEGER*8 Representation
8-5 LOGICAL Representations
8-6 IEEE S_float REAL (KIND=4) or REAL*4 Representation
8-7 VAX F_float REAL (KIND=4) or REAL*4 Representation
8-8 IEEE T_float REAL (KIND=8) or REAL*8 Representation
8-9 VAX G_float REAL (KIND=8) or REAL*8 Representation
8-10 VAX D_float REAL (KIND=8) or REAL*8 Representation
8-11 X_float REAL (KIND=16) Floating-Point Data Representation
8-12 IEEE S_float COMPLEX (KIND=4) or COMPLEX*8 Representation
8-13 VAX F_float COMPLEX (KIND=4) or COMPLEX*8 Representation
8-14 IEEE T_float COMPLEX (KIND=8) or COMPLEX*16 Representation
8-15 VAX G_float COMPLEX (KIND=8) or COMPLEX*16 Representation
8-16 VAX D_float COMPLEX (KIND=8) or COMPLEX*16 Representation
8-17 COMPLEX (KIND=16) or COMPLEX*32 Representation
8-18 CHARACTER Data Representation
9-1 Little and Big Endian Storage of an INTEGER Value
9-2 Sample Unformatted File Conversion
14-1 Effects of Calls to LIB$SIGNAL or LIB$STOP
A-1 VAX H_float REAL*16 Representation (VAX Systems)
Tables
1 Conventions Used in This Document
1-1 Main Tools for Program Development and Testing
2-1 FORTRAN Command Qualifiers
2-2 FORTRAN Command Flags and Categories
2-3 Commands to Control Library Files
2-4 Compiler Limits
3-1 LINK Command Qualifiers
3-2 /DEBUG and /TRACEBACK Qualifiers
5-1 FORTRAN Qualifiers Related to Run-Time Performance
5-2 Qualifiers that Slow Run-Time Performance
5-3 Output Argument Array Types
5-4 Types of Optimization Performed at Different /OPTIMIZE =LEVEL = n Levels
6-1 Summary of I/O Statements
6-2 Available I/O Statements and Record I/O Forms
6-3 Predefined System Logical Names
6-4 Implicit Fortran Logical Units
6-5 OPEN Statement Functions and Specifiers
6-6 Valid Combinations of Record Access Mode and File Organization
7-1 Summary of Run-Time Errors
8-1 Compaq Fortran Intrinsic Data Types, Storage, and Numeric Ranges
8-2 IEEE Exceptional Floating-Point Numbers
9-1 Unformatted Numeric Formats, Keywords, and Supported Data Types
10-1 C Property and Argument Passing
10-2 OpenVMS Alpha Register Usage
10-3 Function Return Values
10-4 Run-Time Library Facilities
10-5 System Services
10-6 Compaq Fortran Implementation of OpenVMS Data Types
10-7 Variable Data Type Requirements
10-8 Compaq Fortran and C Data Types
11-1 RMS Fields Available with USEROPEN
13-1 PSECT Names and Attributes
13-2 Compaq Fortran PSECT Attributes
14-1 Severity Codes for Exception Condition Values
14-2 Condition-Handler Function Return Values
15-1 CXML Routine Groups
A-1 Summary of Language Compatibility
A-2 Compaq Fortran Qualifiers Without Equivalents in Compaq Fortran 77 for OpenVMS VAX Systems
A-3 Compaq Fortran 77 for OpenVMS VAX Systems Options Not in Compaq Fortran
A-4 Floating-Point Data Formats on OpenVMS VAX and OpenVMS Alpha Systems
B-1 Run-Time Error Messages and Explanations
C-1 Compaq Fortran Compile-Time Logical Names
C-2 Run-Time Logical Names
D-1 Contents of System Library FORSYSDEF


Next Index