2. Main Features of Fortran 90

Fortran 90 is a new programming language intended for use in scientific and engineering applications. It is a language that has developed by the introduction of features that are new to Fortran, but are based on experience of other languages (like C and Matlab for instance). Fortran 90 is very different from earlier versions of Fortran, yet it is completely backwards compatible with Fortran 77.

The features of Fortran 90 are far too numerous to mention in entirety here, but some of the key features are outlined below:

Free format on source code.
In Fortran 90, you can use either the Fortran 77 input format or free format. If you use free format, the file extension .f90 should be used for the file name.
Dynamic allocation and pointers.
It is now possible to allocate storage dynamically. This enables us to finally get rid of all the "work" arrays!
User defined data types.
You can now define your own composite data types, similar to struct in C or record in Pascal.
Modules.
Modules enables you to program in an object oriented style, similar to C++. Modules can also be used to hide global variables, thereby making the Fortran 77 common construct outdated.
Recursive functions.
Now a part of the language.
Built-in array operations.
Statements like A=0 and C=A+B are now valid when A and B are arrays. There are also built-in functions for matrix operations, e.g., matmul for performing matrix multiplication.
Operator overloading.
You can define your own meaning of operators like + and = for your own data types (objects).

Copyright © 1996-7 by Stanford University. All rights reserved.