Compaq Fortran
User Manual for
Tru64 UNIX and Linux Alpha Systems


Previous Contents Index

Chapter 7
7 Compaq Fortran Input/Output (I/O)
     7.1     Logical I/O Units
     7.2     Types of I/O Statements
     7.3     Forms of I/O Statements
     7.4     Types of Files and File Characteristics
         7.4.1         File Organizations
         7.4.2         Internal Files and Scratch Files
         7.4.3         Record Types, Record Overhead, and Maximum Record Length
             7.4.3.1             Portability Considerations of Record Types
             7.4.3.2             Record Overhead
             7.4.3.3             Maximum Record Length
         7.4.4         Other File Characteristics
     7.5     File Operations: OPEN, INQUIRE, CLOSE Statements
         7.5.1         Opening Files: The OPEN Statement
             7.5.1.1             Using Preconnected Standard I/O Files
             7.5.1.2             OPEN Statement Specifiers
             7.5.1.3             Methods to Specify the Unit, File Name, and Directory
             7.5.1.4             Accessing Files: Implied and Explicit File and Pathnames
             7.5.1.5             How Compaq Fortran Applies a Default Pathname and File Name
             7.5.1.6             Coding File Locations in an OPEN Statement
             7.5.1.7             Using Environment Variables
         7.5.2         Obtaining File Information: The INQUIRE Statement
             7.5.2.1             Inquiry by Unit
             7.5.2.2             Inquiry by File Name
             7.5.2.3             Inquiry by Output Item List
         7.5.3         Closing a File: The CLOSE Statement
     7.6     Record Operations
         7.6.1         Record I/O Statement Specifiers
         7.6.2         Record Access Modes and File Sharing
             7.6.2.1             Sequential Access
             7.6.2.2             Direct Access
             7.6.2.3             Limitations of Record Access by File Organization and Record Type
             7.6.2.4             File Sharing
         7.6.3         Specifying the Initial Record Position
         7.6.4         Advancing and Nonadvancing Record I/O
         7.6.5         Record Transfer
             7.6.5.1             Input Record Transfer
             7.6.5.2             Output Record Transfer
     7.7     User-Supplied OPEN Procedures: the USEROPEN Specifier
         7.7.1         Restrictions of Called USEROPEN Functions
         7.7.2         Example USEROPEN Program and Function
     7.8     Format of Compaq Fortran Record Types
         7.8.1         Fixed-Length Records
         7.8.2         Variable-Length Records
         7.8.3         Segmented Records
         7.8.4         Stream File Data
         7.8.5         Stream_CR and Stream_LF Records
Chapter 8
8 Run-Time Errors and Signals
     8.1     Compaq Fortran Run-Time Library Default Error Processing
         8.1.1         Run-Time Message Format
         8.1.2         Message Catalog Location
         8.1.3         Values Returned to the Shell at Program Termination
         8.1.4         Forcing a Core Dump for Severe Errors
     8.2     Handling Errors
         8.2.1         Using the END, EOR, and ERR Branch Specifiers
         8.2.2         Using the IOSTAT Specifier
         8.2.3         Using the 3f Library Routines to Return Operating System Errors
     8.3     Signal Handling
     8.4     List of Run-Time Messages
Chapter 9
9 Data Types and Representation
     9.1     Summary of Data Types and Characteristics
     9.2     Integer Data Representations
         9.2.1         Integer Declarations and f90/fort Compiler Options
         9.2.2         INTEGER (KIND=1) or INTEGER*1 Representation
         9.2.3         INTEGER (KIND=2) or INTEGER*2 Representation
         9.2.4         INTEGER (KIND=4) or INTEGER*4 Representation
         9.2.5         INTEGER (KIND=8) or INTEGER*8 Representation
     9.3     Logical Data Representations
     9.4     Native IEEE Floating-Point Representations and Exceptional Values
         9.4.1         REAL and COMPLEX Declarations and f90/fort Compiler Options
         9.4.2         REAL (KIND=4) or REAL*4 Representation
         9.4.3         REAL (KIND=8) or REAL*8 Representation
         9.4.4         REAL (KIND=16) or REAL*16 Representation
         9.4.5         COMPLEX (KIND=4) or COMPLEX*8 Representation
         9.4.6         COMPLEX (KIND=8) or COMPLEX*16 Representation
         9.4.7         COMPLEX (KIND=16) or COMPLEX*32 Representation
         9.4.8         Exceptional Floating-Point Representations
     9.5     Character Representation
     9.6     Hollerith Representation
Chapter 10
10 Converting Unformatted Numeric Data
     10.1     Endian Order of Numeric Formats
     10.2     Native and Supported Nonnative Numeric Formats
     10.3     Limitations of Numeric Conversion
     10.4     Methods of Specifying the Unformatted Numeric Format
         10.4.1         Environment Variable FORT_CONVERTn Method
         10.4.2         Environment Variable FORT_CONVERT.ext Method
         10.4.3         OPEN Statement CONVERT='keyword' Method
         10.4.4         OPTIONS Statement /CONVERT=keyword Method
         10.4.5         f90 Command -convert keyword Option Method
         10.4.6         Additional Notes on Nonnative Data
Chapter 11
11 Procedure Data Interfaces and Mixed Language Programming
     11.1     Compaq Fortran Procedures and Argument Passing
         11.1.1         Explicit and Implicit Interfaces
         11.1.2         Types of Compaq Fortran Subprograms
         11.1.3         Using Procedure Interface Blocks
         11.1.4         Passing Arguments and Function Return Values
         11.1.5         Passing Arrays as Arguments
         11.1.6         Passing Pointers as Arguments
         11.1.7         Compaq Fortran Array Descriptor Format
         11.1.8         Argument-Passing Mechanisms and Built-In Functions
             11.1.8.1             Passing Addresses --- %LOC Function
             11.1.8.2             Passing Arguments by Immediate Value --- %VAL Function
             11.1.8.3             Passing Arguments by Reference --- %REF Function
             11.1.8.4             Examples of Argument Passing Built-in Functions
     11.2     Using the cDEC$ ALIAS and cDEC$ ATTRIBUTES Directives
         11.2.1         The cDEC$ ALIAS directive
         11.2.2         The cDEC$ ATTRIBUTES Directive
             11.2.2.1             C Property
             11.2.2.2             ALIAS Property
             11.2.2.3             REFERENCE and VALUE Properties
             11.2.2.4             EXTERN and VARYING Properties
     11.3     Calling Between Compaq Fortran 77 and Compaq Fortran
         11.3.1         Argument Passing and Function Return Values
         11.3.2         Using Data Items in Common Blocks
         11.3.3         I/O to the Same Unit Number
     11.4     Calling Between Compaq Fortran and C
         11.4.1         Compiling and Linking Files
         11.4.2         Procedures and External Names
         11.4.3         Invoking a C Function from Compaq Fortran
         11.4.4         Invoking a Compaq Fortran Function or Subroutine from C
         11.4.5         Equivalent Data Types for Function Return Values
         11.4.6         Argument Association and Equivalent Data Types
             11.4.6.1             Compaq Fortran Intrinsic Data Types
             11.4.6.2             Equivalent Compaq Fortran and C Data Types
         11.4.7         Example of Passing Integer Data to C Functions
         11.4.8         Example of Passing Character Data Between Compaq Fortran and C
         11.4.9         Example of Passing Complex Data to C Functions
         11.4.10         Handling User-Defined Structures
         11.4.11         Handling Scalar Pointer Data
         11.4.12         Handling Arrays
         11.4.13         Handling Common Blocks of Data
     11.5     Calling Between Parallel HPF and Non-Parallel HPF Code


Previous Next Contents Index