Intel fortran-80 Laptop User Manual


 
PREF'ACE
GLOSSARY
CHAPTER 1
INTRODUCTION TO FORTRAN
1.1
An
Introductory
Example
................
,
1-1
1.1.1
Comment
Lines
....................
1-1
1.1.2 Type Statement
...................
,
1-2
1.1.3
Input
Statement
...................
,
1-2
1.1.4 Value Assignment
..................
1-2
1.1.5
Output
Statements. . . . . . . . . . . . . . . .
..
1-2
L 1.6
Program
Termination.
. . . . . . . . . . . .
..
1-3
1.2
Summary
Of
FORTRAN-SO
Statements.
. . .
..
1-3
1.2.1 Executable
Statements.
. . . . . . . . . . . .
..
1-3
1.2.2 Nonexecutable
Statements.
. . . . . . . . .
..
1-3
1.2.3
Order
of
Statements . . . . . . . . . . . . . .
..
1-4
CHAPTER
2
FORTRAN CONCEPTS
2.1
FORTRAN
Program
Structure
.............
2-1
2.1.1
Program
units
and
Procedures
.........
2-1
2.1.2
The
PROGRAM
Statement
..........
, 2-2
2.1.3 Statements
and
Lines. . . . . . . . . . . . . .
..
2-2
2.2
FORTRAN
Statement
Elements.
. . . . . . . . .
..
2-3
2.2.1
Character
Set.
.....................
'2-3
2.2.2
Constants
and
Variables
............
, 2-4
2.2.3
Arrays
....................
, . . . .
..
2-6
2.2.4 Expressions
and
Operators
..........
, 2-7
2.2.5 Scope
of
Symbols
.................
2-12
2.3
Notational
Conventions . . . . . . . . . . . . . . .
..
2-13
CHAPTER
3
DEFINING VARIABLES, ARRA YS,AND
MEMORY
3.1
TypeStatements
........................
3-1
3.1.1
REAL
Type
Statement
........
,.....
3-1
3.1.2
INTEGER
Type Statement . . . . . . . . .
..
3-1
3.1.3
LOGICAL
Type Statement
.....
,
.....
3-2
3.1.4
CHARACTER
Type
Statement.
. . . . .
..
3-3
3.1.5
IMPLICIT
Statement
..............
, 3-3
3.2
Array
Definition.
. . . . . . . . . . . . . . . . . . . . .
..
3-4
3.2.1
DIMENSION
Statement
............
, 3-5
3.2.2 Kinds
of
Array
Declarators
..........
, 3-5
3.2.3 Properties
of
Arrays
................
3-6
3.2.4 Referencing
Array
Elements . . . . . . . .
..
3-6
3.3 Assignment Statements
..................
, 3-7
3.3.1 Arithmetic Assignmnt
Statement.
......
3-S
3,,3.2 Logical Assignment Statement.
........
3-9
3.3.3
Character
Assignment
Statement.
. . . .
..
3-9
3.3.4
ASSIGN
Statement.
. . . . . . . . . . . . . .
..
3-9
3.3
.5
DATA
Statement.
. . . . . . . . . . . . . . .
..
3-10
CONTENTS I
3.4
Memory
Definition.
. . . . . . . . . . . . . . . . . .
..
3-11
3.4.1
EQUIVALENCE
Statement
.........
3-11
3.4.2
COMMON
Statement
..............
3-12
3.4.3
BLOCK
DATA
Subprograms
........
3-13
3.4.4
BLOCK
DATA
Statement
...........
3-14
CHAPTER
4
PROGRAM EXECUTION CONTROLS
4.1
Transferring
Program
Control
.............
4-1
4.1.1 Unconditional
GO
TO
Statement
......
4-1
4.1.2
Computer
GO
TO
Statement.
. . . . . . .
..
4-1
4.1.3 Assigned
GO
TO
Statement.
. . . . . . . .
..
4-2
4.1.4 Arithmetic
IF
Statement . . . . . . . . . . .
..
4-2
4.1.5 Logical
IF
Statement.
. . . . . . . . . . . . .
..
4-3
4.1.6
IF,
ELSE
IF,
and
ELSE
Blocks
.......
, 4-3
4.1.7 Block
IF
Statement
.................
4-4
4.1.S ELSE
IF
Statement
................
, 4-4
4.1.9
ELSE
Statement . . . . . . . . . . . . . . . . .
..
4-5
4.1.10
END
IF
Statement.
. . . . . . . . . . . . . .
..
4-5
4.2
Loop
Control
Statements . . . . . . . . . . . . . . .
..
4-6
4.2.1
Operation
of
a
DO
Loop.
. . . . . . . . . .
..
4-6
4.2.2
DO
Statement.
. . . . . . . . . . . . . . . . . .
..
4-6
4.2.3
CONTINUE
Statement.
. . . . . . . . . . .
..
4-7
4.3
Program
Termination
Statements.
. . . . . . . .
..
4-7
4.3.1
PAUSE
Statement.
................
,
4-S
4.3.2
STOP
Statement . . . . . . . . . . . . . . . . .
..
4-S
4.3.3
END
Statement
...................
,
4-S
CHAPTERS
FUNCTIONS
AND
SUBROUTINES
5.1 Intrinsic
And
Statement Functions . . . . . . . .
..
5-1
5.1.1 Intrinsic Functions
.................
5-1
5.1.2
INTRINSIC
Statement
.............
, 5-2
5.1.3 Statement Functions
...............
, 5-2
5.2 External Procedures
....................
, 5-4
5.2.1
FUNCTION
Statement
..............
5-4
5.2.2 Subroutines
......................
, 5-5
5.2.3
SUBROUTINE
Statement.
...........
5-6
5.2.4
RETURN
Statement
...............
, 5-6
5 .2.5 SAVE
Statement.
. . . . . . . . . . . . . . . .
..
5-7
5.2.6
EXTERNAL
Statement.
.............
5-7
5.2.7
CALL
Statement.
. . . . . . . . . . . . . . . .
..
5-S
5.3 Arguments
And
Common
Blocks Revisited
...
,
5-S
5.3.1
Common
Blocks
...................
5-9
5.3.2
Dummy
and
Actual
Arguments.
. . . . .
..
5-9
5.3.3 Association
of
Arguments
............
5-9
CHAPTER
6
INPUT/OUTPUT
6.1 Records, Files,
And
Units
.................
6-1
6.1.1 Record Properties
..................
6-1
6.1.2 File Properties
....................
,
6-1
6.1.3
Unit
Properties.
. . . . . . . . . . . . . . . . .
..
6-3
v