Previous | Table of Contents | Next |
Fortran 90 (ISO, 1991) was a major advance over Fortran 77. It included a greatly liberalized source form, a complete set of iteration and selection control structures, enhanced numeric facilities (e.g., the environmental intrinsic functions), a comprehensive data-parallel array language, data structures (including dynamic structures), user-defined types and operators, procedure extensions (e.g., recursion, internal procedures, explicit procedure interfaces, and user-defined generic procedures), module encapsulation (with powerful data-hiding features), data-type kind parameters (e.g., to regularize the different kinds of reals, provide the corresponding kinds of complex, accommodate different kinds of character, and resolve overloads in a simple way), dynamic objects (e.g., allocatable arrays), and some I/O extensions (e.g., namelist and nonadvancing I/O). The concept of obsolescent features was introduced, and a handful of Fortran 77 features were so identified. But removal of significant numbers of archaic features was controversial, so no features were actually removed. A standard-conforming Fortran 77 program is a standard-conforming Fortran 90 program with the same interpretation.
Fortran 95 (ISO, 1997), specified by WG5 and produced by X3J3, represents a minor revision to Fortran 90. Most of the changes correct and clarify what was in Fortran 90. However, a few significant features, such as pure functions and the forall construct and statement, were added because they are considered important contributions from high performance Fortran. A few (but not all) of the features designated as obsolescent in Fortran 90 have been removed from Fortran 95.
Fortran 95 should be the language of choice for modern applications development. This section sketches why and shows how Fortran 95 can serve this role while accommodating the 40-year Fortran tradition (and application base).
Fortran 95 is a minor extension of Fortran 90; the changes from Fortran 90 are limited primarily to correcting a few errors and inconsistencies in Fortran 90 and timely strengthening of data-parallel array operations. Fortran 95 therefore supports (most of) Fortran 77 and the vast libraries of such legacy Fortran code.
Fortran is famous for its efficiency and prowess for numerical computation. These strengths form two of the basic principles guiding Fortran 95. In addition, inherited from Fortran 90 are the principles of high performance data-parallel array operations and efficient data abstraction. These four fundamental principles, the way they are implemented, and their supporting cast of modern features make Fortran 95 a clean, pleasant language to use for applications requiring either high performance or modern programming techniques, or both.
The Fortran 95 data-parallel array operations constitute a valuable programming paradigm for scalable parallel architectures, especially for array-oriented applications such as many scientific and engineering models.
Dynamically allocatable arrays alleviate many of the deficiencies of those older versions of Fortran with static memory allocation. Pointers provide efficient subobject aliases as well as facilitate the use of dynamic structures such as linked lists and trees. Optimization is preserved in the face of pointers by requiring a target to be designated as such.
Much modern programming involves the definition of arbitrary data types (classes), arbitrary operations on these types, and appropriate data hiding. These capabilities are provided cleanly and efficiently in Fortran 95 by derived data types, flexible procedure overloading and operator definition, and powerful packaging facilities (modules). These provide most object-oriented programming capabilities, except for automatic operator inheritance, in a user-friendly manner.
These are described in detail in subsequent sections.
With support of high-performance computing, modern programming techniques, and legacy code, Fortran 95 represents an unbeatable combination for application development at the close of the 20th century with its rapidly changing computer technology.
Because of the large investment in existing software written in Fortran, X3J3 and WG5 decided to include almost all of Fortran 90 in Fortran 95. (Recall that all of Fortran 77 was included in Fortran 90.) The Fortran 90 features deleted in Fortran 95 are
In all other ways, Fortran 95 is compatible with Fortran 90.
User-defined data types, operators, and assignment provide ways for the programmer to extend Fortran. These facilities allow the programmer to create abstract data types by defining new types and the operations to be performed on them. Fortran modules provide a convenient way to package these new data types and their operations. Modules can be used by the same user in different applications or may be distributed to a number of users on the same or different projects. This provides effective practical support for object-oriented programming, as well as enhancing both economy and efficiency.
Previous | Table of Contents | Next |