HP FORTRAN 77/iX Reference MPE/iX 5.0 Documentation
HP FORTRAN 77/iX Reference
Table of Contents
HP FORTRAN 77/iX Reference
HP FORTRAN 77/iX Reference : COPYRIGHT NOTICE
Ch 1. Introduction to HP FORTRAN 77
The FORTRAN 77 Compiler
FORTRAN Vocabulary
Sample FORTRAN Source File
FORTRAN Terms
Source File Structure
Ch 2. Language Elements
The FORTRAN 77 Character Set
Special Symbols
Keywords
Comments
Symbolic Names
External Names
FORTRAN Intrinsic Functions
Data Types
BYTE (LOGICAL*1) Data Type
BYTE Constants
INTEGER*2 Data Type
INTEGER*2 Constant
INTEGER*4 Data Type
INTEGER*4 Constant
REAL*4 Data Type
REAL*4 Constant
REAL*8 Data Type
REAL*8 Constant
REAL*16 Data Type
REAL*16 Constant
COMPLEX*8 Data Type
COMPLEX*8 Constant
COMPLEX*16 Data Type
COMPLEX*16 Constant
LOGICAL*2 Data Type
LOGICAL*2 Constants
LOGICAL*4 Data Type
LOGICAL*4 Constants
CHARACTER Data Type
CHARACTER Constant
Typeless Constants
Hollerith Constants
Octal Constants
Octal Constants in Assignments
Octal Constants as Actual Parameters
Hexadecimal Constants
Hexadecimal Constants in Assignments
Hexadecimal Constants as Actual Parameters
Variables
Simple Variables
Arrays
Array Declarators
Adjustable Arrays
Dynamic Arrays
Subscripts
Array Element Storage
Arrays as Parameters
Character Substrings
Records
Structure Declarations
Record Declarations
Record References
Expressions
Arithmetic Expressions
Hierarchy of Arithmetic Operators
Consecutive Operators
Expressions with Mixed Operands
Arithmetic Constant Expressions
Character Expressions
Character Constant Expressions
Relational Expressions
Arithmetic Relational Expressions
Character Relational Expressions
Logical Expressions
Bit Masking Expressions
Ch 3. FORTRAN Statements
FORTRAN Statement Format
Statement Classification
Order of Statements
ACCEPT Statement (Executable)
ASSIGN Statement (Executable)
Assignment Statement (Executable)
Arithmetic Assignment Statement (Executable)
Logical Assignment Statement (Executable)
Character Assignment Statement (Executable)
Aggregate Assignment Statement (Executable)
BACKSPACE Statement (Executable)
BLOCK DATA Statement (Nonexecutable)
BYTE Statement (Nonexecutable)
CALL Statement (Executable)
CHARACTER Statement (Nonexecutable)
CLOSE Statement (Executable)
COMMON Statement (Nonexecutable)
COMPLEX Statement (Nonexecutable)
COMPLEX*8 Statement (Nonexecutable)
COMPLEX*16 Statement (Nonexecutable)
CONTINUE Statement (Executable)
DATA Statement (Nonexecutable)
Implied DO Loops in DATA Statements
DECODE Statement (Executable)
DELETE Statement (Executable)
DIMENSION Statement (Nonexecutable)
DO Statement (Executable)
Labeled and Block DO Loops
Labeled DO Loop
Block DO Loop
DO Loop Execution
Implied DO Loop
Implied DO Loops in Input/Output Statements
Collapsed Implied DO Loop
DO-WHILE Statement (Executable)
Nesting DO Loops
Ranges of DO Loops
Extended Range DO Loop
END DO Statement (Executable)
DOUBLE COMPLEX Statement (Nonexecutable)
DOUBLE PRECISION Statement (Nonexecutable)
ELSE Statement (Executable)
ELSE IF Statement (Executable)
ENCODE Statement (Executable)
END Statement (Executable)
END DO Statement (Executable)
END MAP Statement (Nonexecutable)
END STRUCTURE Statement (Nonexecutable)
END UNION Statement (Nonexecutable)
ENDFILE Statement (Executable)
ENDIF Statement (Executable)
ENTRY Statement (Nonexecutable)
EQUIVALENCE Statement (Nonexecutable)
Equivalence of Character Variables
Multi-Dimensioned Equivalence
EXTERNAL Statement (Nonexecutable)
FORMAT Statement (Nonexecutable)
FUNCTION Statement (Nonexecutable)
GOTO Statement (Executable)
Unconditional GOTO Statement (Executable)
Computed GOTO Statement (Executable)
Assigned GOTO Statement (Executable)
IF Statement (Executable)
Arithmetic IF Statement (Executable)
Logical IF Statement (Executable)
Block IF Statement (Executable)
IF-THEN Statement (Executable)
ELSE Statement (Executable)
ELSE IF Statement (Executable)
ENDIF Statement (Executable)
Nesting IF Statements
IMPLICIT Statement (Nonexecutable)
INCLUDE Statement (Nonexecutable)
INQUIRE Statement (Executable)
INTEGER Statement (Nonexecutable)
INTEGER*2 Statement (Nonexecutable)
INTEGER*4 Statement (Nonexecutable)
INTRINSIC Statement (Nonexecutable)
LOGICAL Statement (Nonexecutable)
LOGICAL*1 Statement (Nonexecutable)
LOGICAL*2 Statement (Nonexecutable)
LOGICAL*4 Statement (Nonexecutable)
MAP Statement (Nonexecutable)
NAMELIST Statement (Nonexecutable)
ON Statement (Executable)
OPEN Statement (Executable)
PARAMETER Statement (Nonexecutable)
Alternate PARAMETER Statement (Nonexecutable)
PAUSE Statement (Executable)
PRINT Statement (Executable)
PROGRAM Statement (Nonexecutable)
READ Statement (Executable)
Standard Input READ Statement (Executable)
File READ Statement (Executable)
REAL Statement (Nonexecutable)
REAL*4 Statement (Nonexecutable)
REAL*8 Statement (Nonexecutable)
REAL*16 Statement (Nonexecutable)
RECORD Statement (Nonexecutable)
RETURN Statement (Executable)
REWIND Statement (Executable)
REWRITE Statement (Executable)
SAVE Statement (Nonexecutable)
Statement Function Statement (Nonexecutable)
STOP Statement (Executable)
STRUCTURE Statement (Nonexecutable)
Field Declarations
Unnamed Fields
Data Initialization
UNION Statement (Nonexecutable)
MAP Statement (Nonexecutable)
SUBROUTINE Statement (Nonexecutable)
SYSTEM INTRINSIC Statement (Nonexecutable)
A Value Parameter
Example
A Reference Parameter
The ANYVAR Parameter and UNCHECKABLE_ANYVAR Option
An EXTENSIBLE Parameter
Example
A DEFAULT_PARMS Parameter
A READONLY Parameter
TYPE Statement (Executable)
UNION Statement (Nonexecutable)
UNLOCK Statement (Executable)
VIRTUAL Statement (Nonexecutable)
VOLATILE Statement (Nonexecutable)
WRITE Statement (Executable)
Ch 4. Input/Output
Formatted Input/Output
Formatted Input
Formatted Output
Carriage Control
Format Specifications
Format Specifications in Format Statements
Format Specifications in Input/Output Statements
Format Descriptors
Numeric Format Descriptors
Integer Format Descriptor (I)
Real Format Descriptors (D, E, F, G)
Floating-Point Format Descriptors (D, E)
Fixed-Point Format Descriptor (F)
Fixed- or Floating-Point Format Descriptor (G)
Character Format Descriptors (A, R)
Numeric Data with Character Format Descriptors
Logical Format Descriptor (L)
Octal Format Descriptors (@, K, O)
Hexadecimal Format Descriptor (Z)
Variable Format Descriptor (<expression>)
Monetary Format Descriptor (M)
Numeration Format Descriptor (N)
Edit Descriptors
Blank Interpretation Edit Descriptors (BN, BZ)
End-of-Line Edit Descriptors (NL, NN, $)
Plus Sign Edit Descriptors (S, SP, SS)
Literal Edit Descriptors ('string', "string", H)
Input Bytes Remaining Edit Descriptor (Q)
Position Edit Descriptor (X)
Tab Edit Descriptors (T, TL, TR)
Record Terminator Edit Descriptor ( / )
Colon Edit Descriptor ( : )
Scale Factor Edit Descriptor (P)
Repeat Specification
Nesting of Format Specifications
Processing a Format Specification
Unformatted Input/Output
Unformatted Input
Unformatted Output
List-Directed Input/Output
List-Directed Input
List-Directed Output
Namelist-Directed Input/Output
Namelist Specifier
Namelist-Directed Input
Namelist-Directed Output
Ch 5. File Handling
The OPEN Statement
The FNUM Procedure
The FSET Procedure
The UNITCONTROL Procedure
Automatically Opening Files
Ch 6. Compiling and Running HP FORTRAN 77/iX Programs
The FTNXL Command
The FTNXLLK Command
The FTNXLGO Command
Running the Compiler
Passing Run Command Parameters
Listing Format
Ch 7. Compiler Directives
Effects of the Directives
ALIAS Directive
ALIGNMENT Directive
ANSI Directive
ASSEMBLY Directive
CHECK_ACTUAL_PARM Directive
CHECK_FORMAL_PARM Directive
CHECK_OVERFLOW Directive
CODE Directive
CODE_OFFSETS Directive
CONTINUATIONS Directive
COPYRIGHT Directive
CROSSREF Directive
DEBUG Directive
ELSE Directive
ENDIF Directive
EXTERNAL_ALIAS Directive
FTN3000_66 Directive
FTN3000_66 CHARS
FTN3000_66 IO
FTN3000_66 LOGICALS
HP1000 Directive
ARRAYS Option
ALIGNMENT Option
STRING_MOVE Option
DO_LOOP Option
HP3000_16 Directive
IF Directive
INCLUDE Directive
INIT Directive
LINES Directive
LIST Directive
LIST_CODE Directive
LITERAL_ALIAS Directive
LOCALITY Directive
LONG Directive
LOWERCASE Directive
MIXED_FORMATS Directive
NLS Directive
NLS_SOURCE Directive
NOSTANDARD Directive
CHARS Option
LOGICALS Option
IO Option
SYSTEM Option
INTRINSICS Option
OPEN Option
ONETRIP Directive
OPTIMIZE Directive
Flagging Uninitialized Variables
Example
Loop Unrolling
Limits on Use
Example
PAGE Directive
Page Eject with Control-L
PAGEWIDTH Directive
POSTPEND Directive
RANGE Directive
RLFILE Directive
RLINIT Directive
SAVE_LOCALS Directive
SEGMENT Directive
SET Directive
SHORT Directive
STANDARD_LEVEL Directive
SUBTITLE Directive
SYMDEBUG Directive
SYMTABLE Directive
SYSINTR Directive
SYSTEM INTRINSIC Directive
TABLES Directive
TITLE Directive
UPPERCASE Directive
VERSION Directive
WARNINGS Directive
XREF Directive
Ch 8. Interfacing with Non-FORTRAN Subprograms
Parameter Passing Methods
Use of COMMON and Labels
Files
FORTRAN and C
Logicals
Arrays
Files
Parameter Passing Methods
Complex Numbers
Character
Default Character Passing Method
Hollerith
FORTRAN and Pascal Data Types
Condition Codes
Built-In Functions
Ch 9. Managing Run-Time Errors and Exceptions
Trapping Run-Time Errors
Trap Actions
Arithmetic Trap Procedure
System Trap Procedure
Basic External Function Trap Procedure
Internal Function Trap Procedure
Control-Y Trap Procedure
Exiting a Trap Procedure
I/O Run-Time Errors
Ch 10. Data Format in Memory
Overflow Conditions
BYTE (LOGICAL*1) Format
INTEGER*2 Format
INTEGER*4 Format
REAL*4 Format
REAL*8 Format
REAL*16 Format
COMPLEX*8 Format
COMPLEX*16 Format
LOGICAL*2 Format
LOGICAL*4 Format
Character Format
Hollerith Format
Ap A. Diagnostic Messages
Compile-Time Diagnostics
Run-Time Errors
Compile-Time Errors
Compile-Time Errors (cont.)
Compile-Time Warnings
ANSI Warnings
Run-Time Errors
Ap B. Intrinsic Functions and Math Subroutines
Invoking an Intrinsic Function
Generic and Specific Function Names
Summary of the Intrinsic Functions
Notes for Tables B-1 through B-8
FORTRAN Intrinsic Functions and Subroutines
DATE Subroutine
IDATE Subroutine
EXIT Subroutine
RAN Function
SECNDS Function
TIME Subroutine
Setting the TZ Environment Variable
Function Descriptions
ABS Function
ACOS Function
ACOSD Function
ACOSH Function
AINT Function
ANINT Function
ASIN Function
ASIND Function
ASINH Function
ATAN Function
ATAN2 Function
ATAND Function
ATAN2D Function
ATANH Function
BADDRESS Function
BTEST Function
CHAR Function
CMPLX Function
CONJG Function
COS Function
COSD Function
COSH Function
DBLE Function
DCMPLX Function
DIM Function
DNUM Function
DPROD Function
EXP Function
IAND Function
IBCLR Function
IBITS Function
IBSET Function
ICHAR Function
IEOR Function
IMAG Function
INDEX Function
Function Descriptions (cont.)
INT Function
INUM Function
IOR Function
ISHFT Function
ISHFTC Function
IXOR Function
IZEXT
JNUM Function
LEN Function
LGE Function
LGT Function
LLE Function
LLT Function
LOG Function
LOG10 Function
MAX Function
MIN Function
MOD Function
MVBITS Subroutine
NINT Function
NOT Function
QEXT Function
QNUM Function
QPROD Function
REAL Function
RNUM Function
SIGN Function
SIN Function
SIND Function
SINH Function
SIZEOF Function
SQRT Function
TAN Function
TAND Function
TANH Function
ZEXT Function
Ap C. FORTRAN Comparisons
Extensions to the Standard
MIL-STD-1753 Extensions
Other Extensions
Comparison of HP FORTRAN 77 and FORTRAN 66/V
Comparison of HP FORTRAN 77 and FORTRAN 7X
Ap D. HP Character Set
Ap E. Indexed Sequential Access Program
INDEX
Index
MPE/iX 5.0 Documentation