Unix Support

Introduction to Modern Fortran

IMPORTANT: This course is partially copyright Dr J.S. Morgan, Computing Services Department, the University of Liverpool, and its presence here does NOT constitute permission to copy it for any reason or use other than attending the course. The other part of the copyright is the speaker's. You may, of course, refer to these pages this to see what they contain, or for personal study. If you want to take a copy for any other reason, please contact the speaker for permission.

This is a basic introduction to modern Fortran. At the end of the course, students should be able to write significant programs in Fortran, and to be able to start working on existing programs written in modern Fortran (i.e. in the Fortran 90/95 style). It will not cover obsolete features of Fortran, some of the more advanced aspects, or most of the extensions introduced by Fortran 2003.

The course has been rewritten in the light of experience from last year, and will include less on the concepts of programming and more on what practical Fortran programmers need to know (such as a session on Fortran I/O).

The presentations and practicals, arranged by lecture:

Normally, lectures 1 to 5 are given on the first day, 6 to 8 on the second, and 9 onwards (including some of the extra material) on the third. But the schedule and coverage may be varied to meet the needs of the audience.

1: Introduction
Practical
Solutions

2: Fortran Language Rules
Practical
Solutions

3: Data Types and Basic Calculation
Practical
Solutions

4: Control Constructs
Practical
Solutions

5: Array Concepts
Practical
Solutions

6: Procedures
Practical
Solutions

7: KIND, Precision and COMPLEX
Practical
Solutions

8: Modules and Interfaces
Practical
Solutions

9: Derived Types
Practical
Solutions

10: I/O and Files
11: More About I/O and Files
[To be provided] Practical
[To be provided] Solutions

Programs and data used in the course.

Programs and Data

Extra material:

You are advised not to look at these until you are comfortable using the material in the previous lectures. See also the Old Fortran course below, which contains some explanation of older features I have ignored.

12: Data Pointers

13: Advanced Array Concepts

14: Advanced Use Of Procedures

15: Advanced I/O and Files

Answers to the practicals used in the course:

Specimen Answers

Books and other references:

Programming in Fortran 90/95 by Steve Morgan and Lawrie Schonfelder (Fortran Market, PDF, $15)

Fortran 95/2003 Explained by Michael Metcalf, John Reid and Malcolm Cohen

Also Fortran 90 versions of above two

Fortran 90 Programming by Miles Ellis, Ivor Phillips and Thomas Lahey

How Computers Handle Numbers

Courses on Old Fortran

SC22WG5 (ISO Fortran standard)

Liverpool Course

The title of this document is: Introduction to Modern Fortran
URL: http://www-uxsup.csx.cam.ac.uk/courses/Fortran/index.html