[PDF] FORTRAN 77 Reference Manual May 13 2010 This manual





Previous PDF Next PDF



FORTRAN 77 4.0 Reference Manual

Some of the material in this manual is based on the Bell Laboratories document entitled “A Portable Fortran 77 Compiler” by S. I. Feldman.



Fortran 77 Language Reference Manual

statement DATA statement



FORTRAN 77 Users Guide

with a maximum of efficiency. This manual complements the FORTRAN 77 Reference. Manual which contains a formal specification of the FORTRAN 77 Programming.



FORTRAN 77 4.0 Reference Manual

Some of the material in this manual is based on the Bell Laboratories document entitled “A Portable Fortran 77 Compiler” by S. I. Feldman.



FORTRAN77 Programming Reference Manual

unisys. ClearPath Enterprise Servers. FORTRAN77. Programming Reference Manual. ClearPath MCP 13.1. April 2011. 3957 6053–003 



Concurrent Fortran 77 Reference Manual

Concurrent Fortran 77 Reference Manual. 4. • Chapter 9 contains the Fortran library description. The library contains the. Fortran intrinsic functions as 



FORTRAN 77 Reference Manual

May 13 2010 This manual has been prepared for users of the BULL DPS7



FORTRAN 77 Reference Manual

Jun 2 1983 This is the reference manual of the FORTRAN 77 programming language for the HP 1000. Computer System. The compiler for the FORTRAN 77 ...



FORTRAN 77 4.0 Users Guide

Some of the material in this manual is based on the Bell Laboratories document entitled “A Portable Fortran 77 Compiler” by S. I. Feldman.



FORTRAN 77 Language Reference

WorkShop FORTRAN 77. Typographic Conventions. The following table and notes describe the typographical conventions used in the manual. Typeface. Meaning.

July 1991

1

W????w?

????x

47 A2 15UL Rev02iii

Preface

OBJECTIVES

This manual has been prepared for users of the BULL DPS7, operating under release GCOS7. It contains information about Fortran 77 and the full specification of the language as implemented with GCOS7.

INTENDED READERS

This manual is intended for Fortran 77 programmers who want to use Fortran 77 under

GCOS7.

If the reader has suggestions concerning the form, content, and purpose of this manual, there is a Technical Publications Remarks Form provided at the back of this document. Comments are also welcomed about the following features: ·usefulness of the extensions to ANSI 77 offered by DPS 7 FORTRAN 77 ·additional facilities you would like to access with DPS 7 FORTRAN 77. Your recommendations will be investigated by Research and Development personnel and, if possible, taken into account for future releases.

FORTRAN 77 Reference Manual

iv47 A2 15UL Rev02

ASSOCIATED DOCUMENTS

The following manuals are referred to in conjunction with the present manual:

·For GCOS7 JCL functions

JCL Reference Manual ....................................................................................47 A2 11UJ

JCL User Guide................................................................................................47 A2 12UJ

·For GCOS7 interactive (GCL) functions

IOF Terminal User"s Reference Manual (GCOS7-V3):

Part I : Introduction to IOF..............................................................................47 A2 01UJ

Part II : GCOS Command Language ..............................................................47 A2 02UJ

Part III : Processor commands.........................................................................47 A2 03UJ

Part IV : Appendices .......................................................................................47 A2 04UJ

IOF Terminal User"s Reference Manual (GCOS7-V5):

Part I : Introduction to IOF..............................................................................47 A2 21UJ

Part II : GCL Commands (VBO)......................................................................47 A2 22UJ

Part II : GCL Commands (FBO)......................................................................47 A2 23UJ

Part III : Directives and General Processor commands...................................47 A2 24UJ

Part IV : Appendices .......................................................................................47 A2 25UJ

·For manipulations during compilation and linking

Library Maintenance Reference manual ..........................................................47 A2 01UP

Library Maintenance User"s Guide...................................................................47 A2 02UP

Linker User"s Guide..........................................................................................47 A2 10UP

·For more information on the Fortran Language

DPS7 FORTRAN 77 User Guide.....................................................................47 A2 16UL

Mathematical Library........................................................................................47 A2 99UL

System Overview............................................................................................47 A2 04UG

Program Checkout Facility...............................................................................47 A2 15UP

Preface

47 A2 15UL Rev02v

SYNTAX NOTATION

The commands use the following syntax:

ITEM An item in upper case is a name or keyword and is entered literally as shown. The upper case is merely a convention; in practice you can specify the item in upper or lower case. item An item in lower case indicates that a user-supplied value is expected. In most cases it gives the type and maximum length of the value: char105 a string of up to 105 alphanumeric characters name31 a name of up to 31 characters lib78 a library name of up to 78 characters file78 a file name of up to 78 characters a means a single alphabetic character nnn means a 3-digit number hh.mm means a time in hours and minutes In other cases, it is simply descriptive of the value: device-class condition any-characters { item } { item } { item } A list of items enclosed in braces indicates a choice of values . Only one can be selected. Sometimes the list is presented horizontally, with each item separated by a vertical bar, i.e. {item|item|item} [item] An item enclosed in square brackets is optional. ITEM An underlined item is a default value. It is the value assumed if none is specified. Angle brackets indicate a single key on the micro computer. = , ; $ * / \ . Enter these special non-alphabetic characters as shown.

FORTRAN 77 Reference Manual

Examples

(1) ??{???????{?+????{?|?|H|?}?????}??}

This means you can specify:

PAGES={dec4|(dec4[-dec4][,dec4]...)}

Indicates that PAGES must be specified. Valid entries are a single value or a list of

PAGES=(2,4,10-25,33-36,78,83)

(3) refers to the return key (the enter key) on the

47 A2 15UL Rev02vii

Table of Contents

1. Introduction........................................................................................................... 1-1

1.1 PURPOSE AND NOTES

............................................................................................. 1-1

1.1.1 Before You Begin

...................................................................................................... 1-1

1.1.2 Legend for Tables Containing Additions or Precisions

........................................ 1-2

1.1.3 Purpose

...................................................................................................................... 1-2

1.2 SCOPE

........................................................................................................................ 1-4

1.2.1 Inclusions

................................................................................................................... 1-4

1.2.2 Exclusions

................................................................................................................. 1-4

1.3 NOTATION AND TERMINOLOGY USED IN THIS MANUAL

................................... 1-5

1.3.1 Terminology

............................................................................................................... 1-5

1.3.2 Notation

...................................................................................................................... 1-5

FORTRAN 77 Reference Manual

viii47 A2 15UL Rev02

2. FORTRAN Terms and Concepts................................................................... 2-1

2.1 SEQUENCE

................................................................................................................ 2-1

2.2 SYNTACTIC ITEMS

.................................................................................................... 2-2

2.3 STATEMENTS, COMMENTS, AND LINES

............................................................... 2-3

2.3.1 Classes of Statements

.............................................................................................. 2-3

2.4 PROGRAM UNITS AND PROCEDURES

................................................................... 2-4

2.4.1 Procedures

................................................................................................................. 2-4

2.4.2 Executable Program

.................................................................................................. 2-4

2.5 VARIABLE

.................................................................................................................. 2-5

2.6 ARRAY

........................................................................................................................ 2-6

2.6.1 Array Elements

.......................................................................................................... 2-6

2.7 SUBSTRING

............................................................................................................... 2-7

2.8 DUMMY ARGUMENT

................................................................................................. 2-7

2.9 SCOPE OF SYMBOLIC NAMES AND STATEMENT LABELS

................................ 2-8

2.10 LIST

............................................................................................................................. 2-9

2.11 DEFINITION STATUS

................................................................................................ 2-9

2.12 REFERENCE

.............................................................................................................. 2-10

2.13 STORAGE

................................................................................................................... 2-11

2.14 ASSOCIATION

............................................................................................................ 2-12

Table of Contents

47 A2 15UL Rev02ix

3. Characters, Lines, and Execution Sequence.......................................... 3-1

3.1 FORTRAN CHARACTER SET

................................................................................... 3-1

3.1.1 Letters

........................................................................................................................ 3-1

3.1.2 Digits

.......................................................................................................................... 3-2

3.1.3 Alphanumeric Characters

......................................................................................... 3-2

3.1.4 Special Characters

.................................................................................................... 3-2

3.1.5 Collating Sequence and Graphics

........................................................................... 3-3

3.1.6 Blank Character

......................................................................................................... 3-3

3.2 LINES

.......................................................................................................................... 3-4

3.2.1 Comment Line

........................................................................................................... 3-4

3.2.2 Initial Line

................................................................................................................... 3-4

3.2.3 Continuation Line

...................................................................................................... 3-5

3.3 STATEMENTS

............................................................................................................ 3-6

3.4 STATEMENT LABELS

............................................................................................... 3-7

3.5 ORDER OF STATEMENTS AND LINES

................................................................... 3-8

3.6 NORMAL EXECUTION SEQUENCE AND TRANSFER OF CONTROL

................... 3-11

4. Data Types and Constants.............................................................................. 4-1

4.1 DATA TYPES

.............................................................................................................. 4-1

4.1.1 Data Type of a Name

................................................................................................. 4-1

4.1.2 Type Rules for Data and Procedure Identifiers

...................................................... 4-2

4.1.3 Data Type Properties

................................................................................................ 4-2

4.2 CONSTANTS

.............................................................................................................. 4-3

4.2.1 Data Type of a Constant

........................................................................................... 4-3

4.2.2 Blanks in Constants

.................................................................................................. 4-3

4.2.3 Arithmetic Constants

................................................................................................ 4-3

4.2.3.1 Signs of Constants......................................................................................................4-3

4.3 INTEGER TYPE

.......................................................................................................... 4-4

4.3.1 Integer Constant

........................................................................................................ 4-4

FORTRAN 77 Reference Manual

x47 A2 15UL Rev024.4 REAL TYPE................................................................................................................ 4-5

4.4.1 Basic Real Constant................................................................................................. 4-5

4.4.2 Real Exponent........................................................................................................... 4-5

4.4.3 Real Constant............................................................................................................ 4-5

4.5 DOUBLE PRECISION TYPE...................................................................................... 4-7

4.5.1 Double Precision Exponent..................................................................................... 4-7

4.5.2 Double Precision Constant...................................................................................... 4-7

4.6 COMPLEX TYPE........................................................................................................ 4-9

4.6.1 Complex Constant.................................................................................................... 4-9

4.7 LOGICAL TYPE.......................................................................................................... 4-10

4.7.1 Logical Constant....................................................................................................... 4-10

4.8 CHARACTER TYPE................................................................................................... 4-11

4.8.1 Character Constant................................................................................................... 4-11

4.9 SHORT INTEGER TYPE............................................................................................ 4-12

4.10 SHORT LOGICAL TYPE............................................................................................ 4-13

4.11 QUADRUPLE PRECISION TYPE.............................................................................. 4-14

4.11.1 Quadruple Precision Exponent................................................................................ 4-14

4.11.2 Quadruple Precision Constant................................................................................ 4-14

4.12 COMPLEX DOUBLE PRECISION TYPE................................................................... 4-16

4.12.1 Complex Double Precision Constant...................................................................... 4-16

4.13 HEXADECIMAL CONSTANTS................................................................................... 4-16

4.14 HOLLERITH CONSTANT........................................................................................... 4-18

Table of Contents

47 A2 15UL Rev02xi

5. Arrays and Substrings...................................................................................... 5-1

5.1 ARRAY DECLARATOR

.............................................................................................. 5-2

5.1.1 Form of an Array Declarator

..................................................................................... 5-2

5.1.1.1 Form of a Dimension Declaration................................................................................ 5-2

5.1.1.2 Value of Dimension Bounds........................................................................................ 5-2

5.1.2 Kinds and Occurrences of Array Declarators

........................................................ 5-3

5.1.2.1 Actual Array Declaration.............................................................................................. 5-3

5.1.2.2 Dummy Array Declaration........................................................................................... 5-3

5.2 PROPERTIES OF AN ARRAY

................................................................................... 5-4

5.2.1 Data Type of an Array and an Array Element

......................................................... 5-4

5.2.2 Dimensions of an Array

............................................................................................ 5-4

5.2.3 Size of an Array

......................................................................................................... 5-5

5.2.4 Array Element Ordering

............................................................................................ 5-5

5.2.5 Array Storage Sequence

........................................................................................... 5-5

5.3 ARRAY ELEMENT NAME

.......................................................................................... 5-6

5.4 SUBSCRIPT

................................................................................................................ 5-7

5.4.1 Form of a Subscript

.................................................................................................. 5-7

5.4.2 Subscript Expression

............................................................................................... 5-7

5.4.3 Subscript Value

......................................................................................................... 5-8

5.5 DUMMY AND ACTUAL ARRAYS

.............................................................................. 5-10

5.5.1 Adjustable Arrays and Adjustable Dimensions

...................................................... 5-10

5.6 USE OF ARRAY NAMES

........................................................................................... 5-11

5.7 CHARACTER SUBSTRING

....................................................................................... 5-12

5.7.1 Substring Name

......................................................................................................... 5-12

5.7.2 Substring Expression

............................................................................................... 5-12

FORTRAN 77 Reference Manual

xii47 A2 15UL Rev02

6. Expressions.......................................................................................................... 6-1

6.1 ARITHMETIC EXPRESSIONS

................................................................................... 6-1

6.1.1 Arithmetic Operators

................................................................................................ 6-1

6.1.2 Form and Interpretation of Arithmetic Expressions

.............................................. 6-2

6.1.2.1 Primaries..................................................................................................................... 6-3

6.1.2.2 Factor.......................................................................................................................... 6-3

6.1.2.3Term............................................................................................................................ 6-4

6.1.2.4 Arithmetic Expression ................................................................................................. 6-4

6.1.3 Arithmetic Constant Expression

.............................................................................. 6-5

6.1.3.1 Integer Constant Expression....................................................................................... 6-5

6.1.4 Type and Interpretation of Arithmetic Expressions

............................................... 6-5

6.1.5 Integer Division

......................................................................................................... 6-10

6.2 CHARACTER EXPRESSIONS

................................................................................... 6-11

6.2.1 Character Operator

................................................................................................... 6-11

6.2.2 Form and Interpretation of Character Expressions

............................................... 6-11

6.2.2.1 Character Primaries.................................................................................................... 6-12

6.2.2.2 Character Expression.................................................................................................. 6-12

6.2.3 Character Constant Expression

.............................................................................. 6-12

6.3 RELATIONAL EXPRESSIONS

................................................................................... 6-13

6.3.1 Relational Operators

................................................................................................. 6-13

6.3.2 Arithmetic Relational Expression

............................................................................ 6-13

6.3.3 Interpretation of Arithmetic Relational Expressions

............................................. 6-14

6.3.4 Character Relational Expression

............................................................................. 6-14

6.3.5 Interpretation of Character Relational Expressions

.............................................. 6-15

6.4 LOGICAL EXPRESSIONS

......................................................................................... 6-16

6.4.1 Logical Operators

..................................................................................................... 6-16

6.4.2 Form and Interpretation of Logical Expressions

................................................... 6-17

6.4.2.1 Logical Primaries......................................................................................................... 6-18

6.4.2.2 Logical Factor.............................................................................................................. 6-18

6.4.2.3 Logical Term ............................................................................................................... 6-18

6.4.2.4 Logical Disjunctive....................................................................................................... 6-19

6.4.2.5 Logical Expression......................................................................................................6-19

6.4.3 Value of Logical Factors, Terms, Disjuncts, and Expressions

............................. 6-20

6.4.4 Logical Constant Expression

................................................................................... 6-20

6.5 PRECEDENCE OF OPERATORS

.............................................................................. 6-21

6.5.1 Summary of Interpretation Rules

............................................................................ 6-21

Table of Contents

47 A2 15UL Rev02xiii6.6 EVALUATION OF EXPRESSIONS............................................................................ 6-22

6.6.1 Evaluation of Operands............................................................................................ 6-23

6.6.2 Order of Evaluation or Functions............................................................................ 6-23

6.6.3 Integrity of Parentheses........................................................................................... 6-23

6.6.4 Evaluation of Arithmetic Expressions.................................................................... 6-24

6.6.5 Evaluation of Character Expressions..................................................................... 6-26

6.6.6 Evaluation of Relational Expressions..................................................................... 6-26

6.6.7 Evaluation of Logical Expressions.......................................................................... 6-26

6.7 CONSTANT EXPRESSIONS...................................................................................... 6-27

7. Executable and Nonexecutable Statement Classification................ 7-1

7.1 EXECUTABLE STATEMENTS................................................................................... 7-1

7.2 NONEXECUTABLE STATEMENTS.......................................................................... 7-2

8. Specification Statements................................................................................. 8-1

8.1 DIMENSION STATEMENT......................................................................................... 8-2

8.2 EQUIVALENCE STATEMENT................................................................................... 8-4

8.2.1 Form of an EQUIVALENCE Statement.................................................................... 8-4

8.2.2 Equivalence Association.......................................................................................... 8-4

8.2.3 Equivalence of Character Entities........................................................................... 8-4

8.2.4 Array Names and Array Element Names................................................................. 8-5

8.2.5 Restrictions on EQUIVALENCE Statements........................................................... 8-5

8.3 COMMON STATEMENT............................................................................................ 8-6

8.3.1 Form of a COMMON Statement............................................................................... 8-6

8.3.2 Common Block Storage Sequence......................................................................... 8-7

8.3.3 Size of a Common Block.......................................................................................... 8-7

8.3.4 Common Association............................................................................................... 8-7

8.3.5 Differences Between Named Common and Blank Common................................ 8-7

8.3.6 Restrictions on Common and Equivalence............................................................ 8-8

8.4 TYPE-STATEMENTS................................................................................................. 8-9

8.4.1 Type Statements (except CHARACTER)................................................................. 8-10

8.4.2 CHARACTER Type-Statement.................................................................................. 8-11

FORTRAN 77 Reference Manual

xiv47 A2 15UL Rev028.5 IMPLICIT STATEMENT.............................................................................................. 8-14

8.6 PARAMETER STATEMENT....................................................................................... 8-17

8.7 EXTERNAL STATEMENT.......................................................................................... 8-19

8.8 INTRINSIC STATEMENT........................................................................................... 8-21

8.9 SAVE STATEMENT.................................................................................................... 8-23

8.10 NAMELIST STATEMENT........................................................................................... 8-26

9. Data Statement..................................................................................................... 9-1

9.1 FORM OF A DATA STATEMENT.............................................................................. 9-1

9.2 DATA STATEMENT RESTRICTIONS....................................................................... 9-2

9.3 IMPLIED-DO IN A DATA STATEMENT..................................................................... 9-4

9.4 CHARACTER CONSTANT IN A DATA STATEMENT............................................... 9-5

9.5 HOLLERITH CONSTANT IN A DATA STATEMENT................................................. 9-6

10. Assignment Statements................................................................................... 10-1

10.1 ARITHMETIC ASSIGNMENT STATEMENT.............................................................. 10-1

10.2 LOGICAL ASSIGNMENT STATEMENT.................................................................... 10-4

10.3 STATEMENT LABEL ASSIGNMENT (ASSIGN) STATEMENT................................ 10-6

10.4 CHARACTER ASSIGNMENT STATEMENT.............................................................. 10-8

Table of Contents

47 A2 15UL Rev02xv

11. Control Statements............................................................................................ 11-1

11.1 UNCONDITIONAL GOTO STATEMENT

................................................................... 11-2

11.2 COMPUTED GOTO STATEMENTS

.......................................................................... 11-3

11.3 ASSIGNED GOTO STATEMENT

............................................................................... 11-4

11.4 ARITHMETIC IF STATEMENT

................................................................................... 11-5

11.5 LOGICAL IF STATEMENT

......................................................................................... 11-6

11.6 BLOCK IF STATEMENT

............................................................................................ 11-7

11.6.1 IF-Level

....................................................................................................................... 11-7

11.6.2 IF-Block

...................................................................................................................... 11-7

11.6.3 Execution of a Block IF Statement

.......................................................................... 11-8

11.7 ELSE IF STATEMENT

................................................................................................ 11-9

11.7.1 ELSE IF-Block

............................................................................................................ 11-9

11.7.2 Execution of an ELSE IF Statement

........................................................................ 11-9

11.8 ELSE STATEMENT

.................................................................................................... 11-10

11.8.1 ELSE-Block

................................................................................................................ 11-10

11.8.2 Execution of an ELSE Statement

............................................................................. 11-10

11.9 END IF STATEMENT

................................................................................................. 11-11

quotesdbs_dbs14.pdfusesText_20
[PDF] fortran 77 programming tutorial pdf

[PDF] fortran 77 textbook pdf

[PDF] fortran 77 write

[PDF] fortran 90

[PDF] fortran 90 example

[PDF] fortran 90 function

[PDF] fortran 90 handbook pdf

[PDF] fortran 90 pi

[PDF] fortran 90 programming pdf

[PDF] fortran 90 read

[PDF] fortran 90 standard pdf

[PDF] fortran 90 textbook

[PDF] fortran 90 textbook pdf

[PDF] fortran 90 tutorial pdf

[PDF] fortran 90 write format