USE TOGETHER WITH THE fortran TAG. Fortran 90, the standardized successor to FORTRAN 77, released as an ISO standard in 1991 and an ANSI Standard in 1992. Questions using this tag should be specific to the language defined as Fortran 90 rather than being general Fortran questions.
This major revision of fortran
Please note all version specific fortran questions should also use the generic tag fortran
Fortran90 added many new features to its predecessor fortran77:
- Free-form source input, also with lowercase Fortran keywords
- Identifiers up to 31 characters in length
- Inline comments
- Ability to operate on arrays (or array sections) as a whole, thus greatly simplifying math and engineering computations.
RECURSIVE
procedures- Modules, to group related procedures and data together, and make them available to other program units, including the capability to limit the accessibility to only specific parts of the module.
- A vastly improved argument-passing mechanism, allowing interfaces to be checked at compile time
- User-written interfaces for generic procedures
- Operator overloading
- Derived/abstract data types
- New data type declaration syntax, to specify the data type and other attributes of variables
- Dynamic memory allocation by means of the
ALLOCATABLE
attribute and theALLOCATE
andDEALLOCATE
statements POINTER
attribute, pointer assignment, andNULLIFY
statement to facilitate the creation and manipulation of dynamic data structures- Structured looping constructs, with an
END DO
statement for loop termination, andEXIT
andCYCLE
statements for "breaking out" of normalDO
loop iterations in an orderly way SELECT . . . CASE
construct for multi-way selection- Portable specification of numerical precision under the user's control
- New and enhanced intrinsic procedures.
The introduction of free-form source led to many compilers using the f90
file suffix to distinguish between free-form and fixed-form source. This was perhaps a poor choice of suffix as free-form source is the preferred form in all later revisions of the language. Seeing a f90
suffix does not indicate that the code contained within conforms to, or only to, the Fortran 90 standard.
Fortran 90 was itself revised to form Fortran 95 which is widely implemented. Most newly written Fortran code is not strictly Fortran 90: questioners thinking of using this tag should consider the more generic fortran.