HP Fortran for OpenVMS
User Manual


Previous Contents Index

Chapter 6
6 HP Fortran Input/Output
     6.1     Overview
     6.2     Logical I/O Units
     6.3     Types of I/O Statements
     6.4     Forms of I/O Statements
     6.5     Types of Files and File Characteristics
         6.5.1         File Organizations
         6.5.2         Internal Files and Scratch Files
         6.5.3         I/O Record Types
             6.5.3.1             Portability Considerations of Record Types
             6.5.3.2             Fixed-Length Records
             6.5.3.3             Variable-Length Records
             6.5.3.4             Segmented Records
             6.5.3.5             Stream Records
             6.5.3.6             Stream_CR and Stream_LF Records
         6.5.4         Other File Characteristics
     6.6     Opening Files and the OPEN Statement
         6.6.1         Preconnected Files and Fortran Logical Names
             6.6.1.1             Preconnected Files
             6.6.1.2             HP Fortran Logical Names
         6.6.2         Disk Files and File Specifications
         6.6.3         OPEN Statement Specifiers
     6.7     Obtaining File Information: The INQUIRE Statement
         6.7.1         Inquiry by Unit
         6.7.2         Inquiry by File Name
         6.7.3         Inquiry by Output Item List
     6.8     Closing a File: The CLOSE Statement
     6.9     Record Operations
         6.9.1         Record I/O Statement Specifiers
         6.9.2         Record Access Modes
             6.9.2.1             Sequential Access
             6.9.2.2             Direct Access
             6.9.2.3             Keyed Access
         6.9.3         Shared File Use
         6.9.4         Specifying the Initial Record Position
         6.9.5         Advancing and Nonadvancing Record I/O
         6.9.6         Record Transfer
     6.10     Output Data Buffering and RMS Journaling
Chapter 7
7 Run-Time Errors
     7.1     Run-Time Error Overview
     7.2     HP Fortran RTL Default Error Processing
         7.2.1         Run-Time Message Format
         7.2.2         Run-Time Message Severity Levels
     7.3     Handling Errors
         7.3.1         Using the ERR, EOR, and END Branch Specifiers
         7.3.2         Using the IOSTAT Specifier
     7.4     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     Overview of Converting Unformatted Numeric Data
     9.2     Endian Order of Numeric Formats
     9.3     Native and Supported Nonnative Numeric Formats
     9.4     Limitations of Numeric Conversion
     9.5     Methods of Specifying the Unformatted Numeric Format
         9.5.1         Logical Name FOR$CONVERTnnn Method
         9.5.2         Logical Name FOR$CONVERT.ext (and FOR$CONVERT_ext) Method
         9.5.3         OPEN Statement CONVERT='keyword' Method
         9.5.4         OPTIONS Statement /CONVERT=keyword Method
         9.5.5         FORTRAN Command /CONVERT=keyword Qualifier Method
     9.6     Additional Information on Nonnative Data
Chapter 10
10 Using HP Fortran in the Common Language Environment
     10.1     Overview
     10.2     HP Fortran Procedures and Argument Passing
         10.2.1         Explicit and Implicit Interfaces
         10.2.2         Types of HP Fortran Subprograms
         10.2.3         Using Procedure Interface Blocks
         10.2.4         Passing Arguments and Function Return Values
         10.2.5         Passing Arrays as Arguments
         10.2.6         Passing Pointers as Arguments
         10.2.7         HP Fortran Array Descriptor Format
     10.3     Argument-Passing Mechanisms and Built-In Functions
         10.3.1         Passing Arguments by Descriptor---%DESCR Function
         10.3.2         Passing Addresses---%LOC Function
         10.3.3         Passing Arguments by Immediate Value---%VAL Function
         10.3.4         Passing Arguments by Reference---%REF Function
         10.3.5         Examples of Argument Passing Built-in Functions
     10.4     Using the cDEC$ ALIAS and cDEC$ ATTRIBUTES Directives
         10.4.1         The cDEC$ ALIAS Directive
         10.4.2         The cDEC$ ATTRIBUTES Directive
             10.4.2.1             C Property
             10.4.2.2             ALIAS Property
             10.4.2.3             REFERENCE and VALUE Properties
             10.4.2.4             EXTERN and VARYING Properties
             10.4.2.5             ADDRESS64 Property
     10.5     OpenVMS Procedure-Calling Standard
         10.5.1         Register and Stack Usage
             10.5.1.1             Register and Stack Usage on Alpha
         10.5.2         Return Values of Procedures
         10.5.3         Argument Lists
     10.6     OpenVMS System Routines
         10.6.1         OpenVMS Run-Time Library Routines
         10.6.2         OpenVMS System Services Routines
     10.7     Calling Routines: General Considerations
     10.8     Calling OpenVMS System Services
         10.8.1         Obtaining Values for System Symbols
         10.8.2         Calling System Services by Function Reference
         10.8.3         Calling System Services as Subroutines
         10.8.4         Passing Arguments to System Services
             10.8.4.1             Immediate Value Arguments
             10.8.4.2             Address Arguments
             10.8.4.3             Descriptor Arguments
             10.8.4.4             Data Structure Arguments
             10.8.4.5             Examples of Passing Arguments
     10.9     Calling Between Compaq Fortran 77 and HP Fortran
         10.9.1         Argument Passing and Function Return Values
         10.9.2         Using Data Items in Common Blocks
         10.9.3         I/O to the Same Unit Number
     10.10     Calling Between HP Fortran and HP C
         10.10.1         Compiling and Linking Files
         10.10.2         Procedures and External Names
         10.10.3         Invoking a C Function from HP Fortran
         10.10.4         Invoking an HP Fortran Function or Subroutine from C
         10.10.5         Equivalent Data Types for Function Return Values
         10.10.6         Argument Association and Equivalent Data Types
             10.10.6.1             HP Fortran Intrinsic Data Types
             10.10.6.2             Equivalent HP Fortran and C Data Types
         10.10.7         Example of Passing Integer Data to C Functions
         10.10.8         Example of Passing Complex Data to C Functions
         10.10.9         Handling User-Defined Structures
         10.10.10         Handling Scalar Pointer Data
         10.10.11         Handling Arrays
         10.10.12         Handling Common Blocks of Data


Previous Next Contents Index