Introduction

The programming language Fortran is the dominating language for technical and scientific applications. It was developed originally at IBM in 1954 under the supervision of John Backus.

John Backus in New Mexico, 1976

Already in 1958 the language was expanded to Fortran II, which included subroutines, functions and common blocks. Other manufacturers came later with Fortran compilers for their machines and in 1962 IBM introduced the extended Fortran IV, which was the base for the 1966 agreed American standard ANSI X3.9 - 1966. The International Organization for Standardization agreed on three different levels of Fortran in the document ISO 1539 - 1972.

In April 1978 the American Standardization Committee ANSI approved a new standard for Fortran, it is well known with the name Fortran 77 in order to distinguish the new standard ANSI X3.9-1978 from the old ANSI X3.9-1966, which sometimes nowadays is called Fortran 66. Fortran 77 was very welcome in that it increased the capabilities of writing Fortran programs in a structured way, and that it standardized many of the extensions that different manufacturers had put into their implementations of Fortran. An HTML version of the Fortran 77 Standard is now available!

The International Organization for Standardization accepted Fortran 77 as a standard with the document ISO 1539 - 1980. Also the United States government has accepted Fortran 77 as a Federal standard.

Fortran has now been revised considerably. The working group X3J3 at this time also had some European members, which have had a great influence. Regrettably there is a naming conflict: internationally the new work is called Fortran while in America the old version is called Fortran and new version Fortran 90. In order to avoid confusion it's therefore advisable to use the name Fortran 77 for the old version and Fortran 90 for the new version.

The International Organization for Standardization has accepted Fortran 90 as a new standard ISO 1539:1991. Internationally therefore Fortran 77 is no longer a standard. In September 1992 the American Standardization Committee accepted Fortran 90 as ANSI X3.198 - 1992.

The purpose of the work on a new standard version was to make Fortran usable and efficient language for scientific and technical computations during the nineties. At the moment there is regrettably only a very small number of compilers available for Fortran 90, but that situation will soon improve. The new version of the language contains new facilities for vector and matrix operations, which is very good on vector processors and parallel processors and also several new methods to specify precision (not only the REAL and DOUBLE PRECISION), possibilities to ask for environmental parameters, intrinsic functions to manipulate floating-point numbers (find an exponent, find the base or find the mantissa, and to put those parts together into a floating point number), intrinsic procedures and new specifications for storage and interfaces. In addition, there is a new improved form for the source code and more control statements, recursion and dynamically allocatable arrays are introduced.

Nothing was removed, therefore Fortran 90 includes both modern and not so modern methods for essentially the same tasks. This means that the language is large. The Committee has therefore chosen to call certain concepts in Fortran 77 obsolete, and to perhaps remove them at the next revision, see Appendix 4 Backward Compatibility.

In 1994 the standard was extended with varying length character strings, ISO 1539-2:1994.

A chapter on the new standard ISO/IEC 1539-1:1997 Fortran 95 has recently been added.

Note that at the standardization 1977 - 78 some new features were included like IF...THEN...ELSE...END IF, floating point variables as index in DO-loop (silly that these were introduced) and also the new basic data type CHARACTER for text. The extended DO-loop was removed (which was a very good thing) and the Hollerith constant was removed (except in FORMAT). That means that there are a few programs that obey the Fortran 66 standard but do not obey the Fortran 77 standard. Those things that were removed from the standard in 1978 are included in some of the implementations of Fortran 90. Extensions are permitted, if they can be signaled by the system as differences from the standard.

A very important requirement at the introduction of a new or revised programming language is nowadays that it should permit efficient compilation and execution, not only on conventional computers but preferably also on parallel and massively parallel systems. Somewhat simplified it can be said that Fortran 90 is efficient up to and including vector processors, but less efficient on parallel systems. The reason is simply that Fortran 90 does not contain any statements for division into parallel execution, except what is included automatically in the array concept.

The proposed extension HPF or High Performance Fortran, primarily intended for parallel computers, is therefore described in Appendix 8. This language has the ability to control the allocation of arrays on parallel systems and include facilities for

The main part of this tutorial is chapters 1 to 16 and has the purpose of giving the reader an introduction to Fortran 90. The understanding is greatly improved if the reader does the included Exercises. Most of these have complete solutions. The Appendices 2 and 3 summarize Fortran 77 and the new facilities in Fortran 90, respectively. These two appendices can together with Appendix 5 with the intrinsic functions and subroutines be used as a reference. The word explanations can be used for finding additional information. Those that plan to get a compiler are recommended to also read the relevant file in Appendix 6.


Last modified: 9 March 1998
boein@nsc.liu.se