Next:
Contents
Introduction to FORTRAN
N. West (n.west1@physics.oxford.ac.uk)
Contents
INTRODUCTION
The Layout of FORTRAN Stataments
The Standard Layout
The TAB Layout
Comment Lines, Blank Lines, Spaces and TABs
Constants, Variables, Expressions and Assignments
PRINT, READ, STOP and END statements
GOTO Statements
Unconditional GOTO
Computed GOTO
Assign GOTO
IF statements
ARITHMETIC IF
Logical IF
Block IF
Arrays - DIMENSION, REAL and INTEGER statements
Loops - DO and CONTINUE statements
FORMAT statements
General Discussion
Summary
General I/O
Introduction
READ and WRITE statements
Statement Form
The I/O list
END= and ERR=
UNFORMATTED or BINARY I/O
OPEN and CLOSE statements
REWIND and BACKSPACE statements
DIRECT or RANDOM Access
CHARACTER data
Constants
REAL and INTEGER variables
CHARACTER variables
I/O
LOGICAL Data
Subprograms
Introduction
SUBROUTINE, CALL and RETURN statements
FUNCTION statements
PROGRAM statements
CHARACTER Constants as Arguments
COMMON statements
EQUIVALENCE statements
Initialisation of Variables and Arrays
DATA Statements
BLOCK DATA Statements
Octal and Hexadecimal
Statement Ordering and Program Layout
Building Programs and Using Libraries
Closing Remarks
Exercises
Introduction
On-line Phone Book
Description
Hints and Tips
Possible Extension
Fitting a Straight Line
Description
Hints and Tips
Possible Extension
Finding the Solution to an Equation Between Limits
Description
Hints and Tips
Possible Extension
Monte Carlo of a 1d Spectrum
Description
Hints and Tips
Possible Extension
Histogram Plotter
Description
Hints and Tips
Possible Extension
General Chi-Squared Fitting
Description
Hints and Tips
Possible Extension
About this document ...
n west (APC)
2000-03-08