E-Book Overview
These student notes were developed using the Manchester Computing Centre Fortran90 course, which was compiled by J M Brooke, G S Noland, and M A Pettipher as abasis.
E-Book Content
Fortran 90 A Conversion Course for Fortran 77 Programmers Student Notes S Ramsden, F Lin Manchester and North HPC T&EC M A Pettipher, G S Noland, J M Brooke Manchester Computing Centre, University of Manchester Edition 3.0 July 1995 Acknowledgements These student notes were developed using the Manchester Computing Centre Fortran 90 course, which was compiled by J M Brooke, G S Noland, and M A Pettipher as a basis. Useful comments were also provided by the following: T L Freeman, J Gajjar and A J Grant (The University of Manchester), and A Marshall and J S Morgan (The University of Liverpool). Michael Hennecke, University of Kahlsruhe, Germany, provided comprehensive comments which were incorporated in edition 3.0 of the materials. Manchester and North HPC T&EC i Fortran 90 ii Fortran 90 Student Notes Table of Contents 1 1 1 1 2 3 3 Introduction History Objectives Language Evolution New Features Organisation Coding Convention 5 5 6 6 7 7 10 13 17 Sources, Types and Control Structures Source Form Program and Subprogram Names Specifications Strong Typing The Concept of KIND Derived Types Control Statements Exercises 19 19 20 28 31 35 36 39 Procedures and Modules Program Units Procedures Modules Overloading Scope Program Structure Exercises 41 41 43 45 45 46 48 48 48 49 Array Processing Terminology and Specifications Whole Array Operations Elemental Intrinsic Procedures WHERE Statement Array Sections Array Assignment Recursion Element Location Versus Subscript Zero Sized Arrays Manchester and North HPC T&EC iii For