next up previous contents
Next: Advantages of Additions Up: Fortran Evolution Previous: Drawbacks of FORTRAN 77

 

New Fortran 90 Features

Fortran 90 is a major revision of its predecessor many of the inadequacies of FORTRAN 77 have been addressed:

  1. Fortran 90 defines a new code format which is much more like every other language;
  2. Parallelism can now be expressed using whole array operations which include extensive slicing and sectioning facilities. Arithmetic may now be performed on whole arrays and array sections. Operations in an array valued expression are conceptually performed in parallel.

    To support this feature, many parallel intrinsic functions have been introduced including reduction operations such as SUM (add all elements in an array and return one value -- the sum) and MAXVAL (scan all elements in an array and return one value -- the biggest). This concept comes from APL.

    The masked (parallel) assignment (WHERE) statement is also a new feature.

  3. The introduction of dynamic (heap) storage means that pointers and allocatable arrays can be implemented. Temporary arrays can now be created on-the-fly, pointers can be used for aliasing arrays or sections of arrays and implementing dynamic data structures such as linked lists and trees.
  4. To combat non-portability, the KIND facility has been introduced. This mechanism allows the user to specify the desired precision of an object in a portable way. Type specifications can be parameterised meaning that the precision of a particular type can be changed by altering the value of one constant. Appropriate intrinsic inquiry functions are defined to query the precision of given objects.
  5. User-defined types, which are constructed from existing types, can now be constructed. For example, a type can be defined to represent a 3D coordinate which has three components (x,y,z) or a different type can be used to represent personal details: name, age, sex address, phone number etc. Defining objects in this way is more intuitive and makes programming easier and less error prone.
  6. Explicit recursion is now available. For reasons of efficiency the user must declare a procedure to be recursive but it can then be used to call itself.
  7. Facility packaging has been introduced -- MODULE s replace many features of FORTRAN 77. They can be used for global definitions (of types, objects, operators and procedures), and can be used to provide functionality whose internal details are hidden from the user (data hiding).

    Reshaping and retyping functions have been added to the language which means that features that relied on storage association (such a EQUIVALENCE) do not have to be used.

Return to corresponding overview page gif


next up previous contents
Next: Advantages of Additions Up: Fortran Evolution Previous: Drawbacks of FORTRAN 77

©University of Liverpool, 1997
Wed May 28 20:20:27 BST 1997
Not for commercial use.