The Queen's University of Belfast

Parallel Computer Centre
[Next] [Previous] [Top]
1 Introduction
This course covers the transition from the programming language Fortran 77 to the more modern Fortran 90, and is aimed at Fortran 77 programmers who require an understanding of the principles and new features of Fortran 90. The course may also be suitable for programmers familiar with languages such as C or Pascal, but not for complete beginners in programming.
The programming language Fortran was originally designed for the solution of problems involving numerical computation. The development of Fortran dates back to the 1950s, the first Fortran system being released in 1957, for the IBM 704.
In the early 1960s, as other manufacturers released Fortran compilers for their own computer systems, the need to control and standardise Fortran became apparent. A standards committee was established in 1962, and the first Fortran standard was published in 1966.
Unfortunately, the 1966 Standard did not give a clear, precise definition of Fortran. In the 1970s a new standard was formulated to overcome the problems of Fortran 66 and incorporate several new features. In 1978, the new standard, Fortran 77, was published.
The standards preceding Fortran 90 attempted mainly to standardise existing extensions and practices. Fortran 90, however, is much more an attempt to develop the language, introducing new features using experience from other languages.
The next Fortran revision is expected within the next 10 years.
The objectives of the new Fortran 90 standard were:
- to modernise the language in response to the developments in language design which have been exploited in other languages.
- to standardise vendor extensions such that an efficient portable language is provided.
- to improve the safety of programming in the language and to tighten the conformance requirement, such that the risk of error in standard code is reduced.
- to keep compatible with Fortran 77 by adopting a language evolution method such that the vast investment in Fortran 77 code is preserved.
Fortran 90 is a superset of Fortran 77, and so all standard Fortran 77 programs should run. To prevent the language growing progressively larger, however, as new revisions are produced, the standards committee has adopted a policy of removing obsolete features.
This procedure adopted involves the inclusion of two lists with each new standard. One list contains the deleted features, and the other contains the obsolescent features. The obsolescent list consists of features which are considered to be redundant and may be deleted in the next revision. A feature must appear on the obsolescent list before it can be deleted, thus providing a period of notice of at least one revision cycle.
Fortran 90 contains no deleted features, but contains the following obsolescent features which may be removed at the next revision.
- Arithmetic IF
- REAL and DOUBLE PRECISION DO variables and control expressions
- Shared DO termination, and DO termination on a statement other than on a CONTINUE or an END DO statement
- ASSIGN and assigned GOTO statements
- Assigned FORMAT specifiers
- Branching to END IF from outside IF block
- Alternate RETURN
- PAUSE statement
- H edit descriptor
The following major new features are included in Fortran 90:
- Array processing
- Dynamic memory allocation, including dynamic arrays
- Modules
- Procedures:
- Optional/Keyword Parameters
- Internal Procedures
- Recursive Procedures
- Pointers
Other new features include:
- Free format source code
- Specifications/IMPLICIT NONE
- Parameterised data types
- Derived types
- Operator overloading
- CASE statement
- EXIT and CYCLE
- Many new intrinsic functions
- New I/O features
The new features allow the writing of more readable compact code, resulting in more understandable modular programs with increased functionality. Numerical portability is provided through selected precision, programming errors are reduced by the use of explicit interfaces to sub-programs, and memory is conserved by dynamic memory allocation. Additionally, data parallel capability is provided through the array processing features, which makes Fortran 90 a more efficient language on the new generation of high performance computers.
1.5 Organisation
These student notes are arranged in the following chapters:
- Introduction.
- Sources, Types and Control Structures.
- Procedures and Modules.
- Array Processing.
- Pointer Variables.
- Input/Output.
- Intrinsic Procedures.
- Redundant Features.
- Further Development.
Where appropriate, exercises are included at the end of each chapter. Source code of example programs and solutions to exercises are all available on line. Program names appearing in parenthesis are solutions to exercises.
Fortran 90 references and further sources of information are provided in the Resource List supplied with the course material. Additionally, the compiled resource list is available on the World Wide Web via the following URL:
http://www.hpctec.mcc.ac.uk/hpctec/courses/Fortran90/resource.html
In these student notes code is in courier font, for example:
! this is code
The coding convention followed throughout the student notes is:
- All keywords and intrinsic function names are in capitals; everything else is in lower case.
- The bodies of program units are indented by two columns, as are INTERFACE blocks, DO-loops, IF-blocks, CASE-blocks, etc.
- The name of a program, subroutine, or function is always included on its END statement.
- In USE statements, the ONLY clause is used to document explicitly all entities which are actually accessed from that module.
- In CALL statements and function references, argument keywords are always used for optional arguments.
[Next] [Previous] [Top]
All documents are the responsibility of, and copyright, © their authors and do not represent the views of The Parallel Computer Centre, nor of The Queen's University of Belfast.
Maintained by Alan Rea, email A.Rea@qub.ac.uk
Generated with CERN WebMaker