X3J3/90.4

Table of Contents

1 INTRODUCTION
1.1 Purpose
1.2 Processor
1.3 Scope
1.3.1 Inclusions.
1.3.2 Exclusions.
1.4 Conformance
1.4.1 Subset Conformance.
1.5 Notation Used in This Standard
1.6 Subset Text
2 FORTRAN TERMS AND CONCEPTS
2.1 Sequence
2.2 Syntactic Items
2.3 Statements, Comments, and Lines
2.3.1 Classes of Statements.
2.4 Program Units and Procedures
2.4.1 Procedures.
2.4.2 Executable Program.
2.5 Variable
2.6 Array
2.6.1 Array Elements.
2.7 Substring
2.8 Dummy Argument
2.9 Scope of Symbolic Names and Statement Labels
2.10 List
2.11 Definition Status
2.12 Reference
2.13 Storage
2.14 Association
3 CHARACTERS, LINES, AND EXECUTION SEQUENCE
3.1 FORTRAN Character Set
3.1.1 Letters.
3.1.2 Digits.
3.1.3 Alphanumeric Characters.
3.1.4 Special Characters.
3.1.5 Collating Sequence and Graphics.
3.1.6 Blank Character.
3.2 Lines
3.2.1 Comment Line.
3.2.2 Initial Line.
3.2.3 Continuation Line.
3.3 Statements
3.4 Statement Labels
3.5 Order of Statements and Lines
3.6 Normal Execution Sequence and Transfer of Control
4 DATA TYPES AND CONSTANTS
4.1 Data Types
4.1.1 Data Type of a Name.
4.1.2 Type Rules for Data and Procedure Identifiers.
4.1.3 Data Type Properties.
4.2 Constants
4.2.1 Data Type of a Constant.
4.2.2 Blanks in Constants.
4.2.3 Arithmetic Constants.
4.2.3.1 Signs of Constants.
4.3 Integer Type
4.3.1 Integer Constant.
4.4 Real Type
4.4.1 Basic Real Constant.
4.4.2 Real Exponent.
4.4.3 Real Constant.
4.5 Double Precision Type
4.5.1 Double Precision Exponent.
4.5.2 Double Precision Constant.
4.6 Complex Type
4.6.1 Complex Constant.
4.7 Logical Type
4.7.1 Logical Constant.
4.8 Character Type
4.8.1 Character Constant.
5 ARRAYS AND SUBSTRINGS
5.1 Array Declarator
5.1.1 Form of an Array Declarator.
5.1.1.1 Form of a Dimension Declarator.
5.1.1.2 Value of Dimension Bounds.
5.1.2 Kinds and Occurrences of Array Declarators.
5.1.2.1 Actual Array Declarator.
5.1.2.2 Dummy Array Declarator.
5.2 Properties of an Array
5.2.1 Data Type of an Array and an Array Element.
5.2.2 Dimensions of an Array.
5.2.3 Size of an Array.
5.2.4 Array Element Ordering.
5.2.5 Array Storage Sequence.
5.3 Array Element Name
5.4 Subscript
5.4.1 Form of a Subscript.
5.4.2 Subscript Expression.
5.4.3 Subscript Value.
5.5 Dummy and Actual Arrays
5.5.1 Adjustable Arrays and Adjustable Dimensions.
5.6 Use of Array Names
5.7 Character Substring
5.7.1 Substring Name.
5.7.2 Substring Expression.
6 EXPRESSIONS
6.1 Arithmetic Expressions
6.1.1 Arithmetic Operators.
6.1.2 Form and Interpretation of Arithmetic Expressions.
6.1.2.1 Primaries.
6.1.2.2 Factor.
6.1.2.3 Term.
6.1.2.4 Arithmetic Expression.
6.1.3 Arithmetic Constant Expression.
6.1.3.1 Integer Constant Expression.
6.1.4 Type and Interpretation of Arithmetic Expressions.
6.1.5 Integer Division.
6.2 Character Expressions
6.2.1 Character Operator.
6.2.2 Form and Interpretation of Character Expressions.
6.2.2.1 Character Primaries.
6.2.2.2 Character Expression.
6.2.3 Character Constant Expression.
6.3 Relational Expressions
6.3.1 Relational Operators.
6.3.2 Arithmetic Relational Expression.
6.3.3 Interpretation of Arithmetic Relational Expressions.
6.3.4 Character Relational Expression.
6.3.5 Interpretation of Character Relational Expressions.
6.4 Logical Expressions
6.4.1 Logical Operators.
6.4.2 Form and Interpretation of Logical Expressions.
6.4.2.1 Logical Primaries.
6.4.2.2 Logical Factor.
6.4.2.3 Logical Term.
6.4.2.4 Logical Disjunct.
6.4.2.5 Logical Expression.
6.4.3 Value of Logical Factors, Terms, Disjuncts, and Expressions.
6.4.4 Logical Constant Expression.
6.5 Precedence of Operators
6.5.1 Summary of Interpretation Rules.
6.6 Evaluation of Expressions
6.6.1 Evaluation of Operands.
6.6.2 Order of Evaluation of Functions.
6.6.3 Integrity of Parentheses.
6.6.4 Evaluation of Arithmetic Expressions.
6.6.5 Evaluation of Character Expressions.
6.6.6 Evaluation of Relational Expressions.
6.6.7 Evaluation of Logical Expressions.
6.7 Constant Expressions
7 EXECUTABLE AND NONEXECUTABLE STATEMENT CLASSIFICATION
7.1 Executable Statements
7.2 Nonexecutable Statements
8 SPECIFICATION STATEMENTS
8.1 DIMENSION Statement
8.2 EQUIVALENCE Statement
8.2.1 Form of an EQUIVALENCE Statement.
8.2.2 Equivalence Association.
8.2.3 Equivalence of Character Entities.
8.2.4 Array Names and Array Element Names.
8.2.5 Restrictions on EQUIVALENCE Statements.
8.3 COMMON Statement
8.3.1 Form of a COMMON Statement.
8.3.2 Common Block Storage Sequence.
8.3.3 Size of a Common Block.
8.3.4 Common Association.
8.3.5 Differences between Named Common and Blank Common.
8.3.6 Restrictions on Common and Equivalence.
8.4 Type-Statements
8.4.1 INTEGER, REAL, DOUBLE PRECISION, COMPLEX, and LOGICAL Type-Statements.
8.4.2 CHARACTER Type-Statement.
8.5 IMPLICIT Statement
8.6 PARAMETER Statement
8.7 EXTERNAL Statement
8.8 INTRINSIC Statement
8.9 SAVE Statement
9 DATA STATEMENT
9.1 Form of a DATA Statement
9.2 DATA Statement Restrictions
9.3 Implied-DO in a DATA Statement
9.4 Character Constant in a DATA Statement
10 ASSIGNMENT STATEMENT
10.1 Arithmetic Assignment Statement
10.2 Logical Assignment Statement
10.3 Statement Label Assignment (ASSIGN) Statement
10.4 Character Assignment Statement
11 CONTROL STATEMENTS
11.1 Unconditional GO TO Statement
11.2 Computed GO TO Statement
11.3 Assigned GO TO Statement
11.4 Arithmetic IF Statement
11.5 Logical IF Statement
11.6 Block IF Statement
11.6.1 IF-Level.
11.6.2 IF-Block.
11.6.3 Execution of a Block IF Statement.
11.7 ELSE IF Statement
11.7.1 ELSE IF-Block.
11.7.2 Execution of an ELSE IF Statement.
11.8 ELSE Statement
11.8.1 ELSE-Block.
11.8.2 Execution of an ELSE Statement.
11.9 END IF Statement
11.10 DO Statement
11.10.1 Range of a DO-Loop.
11.10.2 Active and Inactive DO-Loops.
11.10.3 Executing a DO Statement.
11.10.4 Loop Control Processing.
11.10.5 Execution of the Range.
11.10.6 Terminal Statement Execution.
11.10.7 Incrementation Processing.
11.10.8 Transfer into the Range of a DO-Loop.
11.11 CONTINUE Statement
11.12 STOP Statement
11.13 PAUSE Statement
11.14 END Statement
12 INPUT/OUTPUT STATEMENTS
12.1 Records
12.1.1 Formatted Record.
12.1.2 Unformatted Record.
12.1.3 Endfile Record.
12.2 Files
12.2.1 File Existence.
12.2.2 File Properties.
12.2.3 File Position.
12.2.4 File Access.
12.2.4.1 Sequential Access.
12.2.4.2 Direct Access.
12.2.5 Internal Files.
12.2.5.1 Internal File Properties.
12.2.5.2 Internal File Restrictions.
12.3 Units
12.3.1 Unit Existence.
12.3.2 Connection of a Unit.
12.3.3 Unit Specifier and Identifier.
12.4 Format Specifier and Identifier
12.5 Record Specifier
12.6 Error and End-of-File Conditions
12.7 Input/Output Status, Error, and End-of-File Specifiers
12.7.1 Error Specifier.
12.7.2 End-of-File Specifier.
12.8 READ, WRITE, and PRINT Statements
12.8.1 Control Information List.
12.8.2 Input/Output List.
12.8.2.1 Input List Items.
12.8.2.2 Output List Items.
12.8.2.3 Implied-DO List.
12.9 Execution of a Data Transfer Input/Output Statement
12.9.1 Direction of Data Transfer.
12.9.2 Identifying a Unit.
12.9.3 Establishing a Format.
12.9.4 File Position Prior to Data Transfer.
12.9.4.1 Sequential Access.
12.9.4.2 Direct Access.
12.9.5 Data Transfer.
12.9.5.1 Unformatted Data Transfer.
12.9.5.2 Formatted Data Transfer.
12.9.5.2.1 Using a Format Specification.
12.9.5.2.2 List-Directed Formatting.
12.9.5.2.3 Printing of Formatted Records.
12.9.6 File Position After Data Transfer.
12.9.7 Input/Output Status Specifier Definition.
12.10 Auxiliary Input/Output Statements
12.10.1 OPEN Statement.
12.10.1.1 Open of a Connected Unit.
12.10.2 CLOSE Statement.
12.10.2.1 Implicit Close at Termination of Execution.
12.10.3 INQUIRE Statement.
12.10.3.1 INQUIRE by File.
12.10.3.2 INQUIRE by Unit.
12.10.3.3 Inquiry Specifiers.
12.10.4 File Positioning Statements.
12.10.4.1 BACKSPACE Statement.
12.10.4.2 ENDFILE Statement.
12.10.4.3 REWIND Statement.
12.11 Restrictions on Function References and List Items
12.12 Restriction on Input/Output Statements
13 FORMAT SPECIFICATION
13.1 Format Specification Methods
13.1.1 FORMAT Statement.
13.1.2 Character Format Specification.
13.2 Form of a Format Specification
13.2.1 Edit Descriptors.
13.3 Interaction Between Input/Output List and Format
13.4 Positioning by Format Control
13.5 Editing
13.5.1 Apostrophe Editing.
13.5.2 H Editing.
13.5.3 Positional Editing.
13.5.3.1 T, TL, and TR Editing.
13.5.3.2 X Editing.
13.5.4 Slash Editing.
13.5.5 Colon Editing.
13.5.6 S, SP, and SS Editing.
13.5.7 P Editing.
13.5.7.1 Scale Factor.
13.5.8 BN and BZ Editing.
13.5.9 Numeric Editing.
13.5.9.1 Integer Editing.
13.5.9.2 Real and Double Precision Editing.
13.5.9.2.1 F Editing.
13.5.9.2.2 E and D Editing.
13.5.9.2.3 G Editing.
13.5.9.2.4 Complex Editing.
13.5.10 L Editing.
13.5.11 A Editing.
13.6 List-Directed Formatting
13.6.1 List-Directed Input.
13.6.2 List-Directed Output.
14 MAIN PROGRAM
14.1 PROGRAM Statement
14.2 Main Program Restrictions
15 FUNCTIONS AND SUBROUTINES
15.1 Categories of Functions and Subroutines
15.1.1 Procedures.
15.1.2 External Functions.
15.1.3 Subroutines.
15.1.4 Dummy Procedure.
15.2 Referencing a Function
15.2.1 Form of a Function Reference.
15.2.2 Execution of a Function Reference.
15.3 Intrinsic Functions
15.3.1 Specific Names and Generic Names.
15.3.2 Referencing an Intrinsic Function.
15.3.3 Intrinsic Function Restrictions.
15.4 Statement Function
15.4.1 Form of a Statement Function Statement.
15.4.2 Referencing a Statement Function.
15.4.3 Statement Function Restrictions.
15.5 External Functions
15.5.1 Function Subprogram and FUNCTION Statement.
15.5.2 Referencing an External Function.
15.5.2.1 Execution of an External Function Reference.
15.5.2.2 Actual Arguments for an External Function.
15.5.3 Function Subprogram Restrictions.
15.6 Subroutines
15.6.1 Subroutine Subprogram and SUBROUTINE Statement.
15.6.2 Subroutine Reference.
15.6.2.1 Form of a CALL Statement.
15.6.2.2 Execution of a CALL Statement.
15.6.2.3 Actual Arguments for a Subroutine.
15.6.3 Subroutine Subprogram Restrictions.
15.7 ENTRY Statement
15.7.1 Form of an ENTRY Statement.
15.7.2 Referencing External Procedure by Entry Name.
15.7.3 Entry Association.
15.7.4 ENTRY Statement Restrictions.
15.8 RETURN Statement
15.8.1 Form of a RETURN Statement.
15.8.2 Execution of a RETURN Statement.
15.8.3 Alternate Return.
15.8.4 Definition Status.
15.9 Arguments and Common Blocks
15.9.1 Dummy Arguments.
15.9.2 Actual Arguments.
15.9.3 Association of Dummy and Actual Arguments.
15.9.3.1 Length of Character Dummy and Actual Arguments.
15.9.3.2 Variables as Dummy Arguments.
15.9.3.3 Arrays as Dummy Arguments.
15.9.3.4 Procedures as Dummy Arguments.
15.9.3.5 Asterisks as Dummy Arguments.
15.9.3.6 Restrictions on Association of Entities.
15.9.4 Common Blocks.
15.10 Table of Intrinsic Functions
15.10.1 Restrictions on Range of Arguments and Results.
16 BLOCK DATA SUBPROGRAM
16.1 BLOCK DATA Statement
16.2 Block Data Subprogram Restrictions
17 ASSOCIATION AND DEFINITION
17.1 Storage and Association
17.1.1 Storage Sequence.
17.1.2 Association of Storage Sequences.
17.1.3 Association of Entities.
17.2 Events That Cause Entities to Become Defined
17.3 Events That Caused Entities to Become Undefined
18 SCOPES AND CLASSES OF SYMBOLIC NAMES
18.1 Scope of Symbolic Names
18.1.1 Global Entities.
18.1.1.1 Classes of Global Entities.
18.1.2 Local Entities.
18.1.2.1 Classes of Local Entities.
18.2 Classes of Symbolic Names
18.2.1 Common block.
18.2.2 External Function.
18.2.3 Subroutine.
18.2.4 Main Program.
18.2.5 Block Data Subprogram.
18.2.6 Array.
18.2.7 Variable.
18.2.8 Constant.
18.2.9 Statement Function.
18.2.10 Intrinsic Function.
18.2.11 Dummy Procedure.

Appendix A: Criteria, conflicts, and portability

A1 Criteria
A2 Conflicts with ANSI X3.9-1966
A3 Standard Items That Inhibit Portability
A4 Recommendation for Enhancing Portability

Appendix B: Section notes

B1 Section 1 Notes
B2 Section 2 Notes
B3 Section 3 Notes
B4 Section 4 Notes
B5 Section 5 Notes
B6 Section 6 Notes
B7 Section 7 Notes
B8 Section 8 Notes
B9 Section 9 Notes
B10 Section 10 Notes
B11 Section 11 Notes
B12 Section 12 Notes
B13 Section 13 Notes
B14 Section 14 Notes
B15 Section 15 Notes
B16 Section 16 Notes
B17 Section 17 Notes
B18 Section 18 Notes

Appendix C: Hollerith

C1 Hollerith Data Type
C2 Hollerith Constant
C3 Restrictions on Hollerith Constants
C4 Hollerith Constant
C5 Hollerith Format Specification
C6 A Editing of Hollerith Data
C7 Hollerith Constant in a Subroutine Reference

Appendix D: Subset Overview

D1 Background
D2 Criteria
D2.1 Full Language.
D2.2 Subset Language.
D3 Summary of Subset Differences
D3.1 Section 1: Introduction.
D3.2 Section 2: FORTRAN Terms and Concepts.
D3.3 Section 3: Characters, Lines, and Execution Sequence.
D3.4 Section 4: Data Types and Constants.
D3.5 Section 5: Arrays and Substrings.
D3.6 Section 6: Expressions.
D3.7 Section 7: Executable and Nonexecutable Statement Classification.
D3.8 Section 8: Specification Statements.
D3.9 Section 9: DATA Statement.
D3.10 Section 10: Assignment Statements.
D3.11 Section 11: Control Statements.
D3.12 Section 12: Input/Output Statements.
D3.13 Section 13: Format Specification.
D3.14 Section 14: Main Program.
D3.15 Section 15: Functions and Subroutines.
D3.16 Section 16: Block Data Subprogram.
D3.17 Section 17: Association and Definition.
D3.18 Section 18: Scope and Classes of Symbolic Names.
D3.19 Section 1 to 18: Character Type.
D3.19.1 Character Features in the Subset.
D3.19.2 Character Features Not in the Subset.
D4 Subset Conformance.
D4.1 Subset Processor Conformance.
D4.2 Subset Program Performance.

Appendix E: Fortran Statements

Appendix F: Syntax Charts


This document was translated by troff2html v0.21 on August 17, 1995.