Fortran has been standardised since 1966. The standard is now maintained by the ISO working group WG5 and the US committee J3 (INCITS PL22.3), which publish free working drafts of each revision. A source file does not say which version it is written for, and a compiler accepts the new forms along with the old; the version names a level of the language.
The standards
| Name | Standard | Main additions |
|---|---|---|
| FORTRAN (I), II, III, IV | IBM manuals, 1957 to 1962 | the first language, John Backus’s team at IBM on the IBM 704 (1957); subroutines and functions (II); logical IF, the COMMON and EQUIVALENCE storage statements and double precision and complex types (IV) |
| FORTRAN 66 | ANSI X3.9-1966, the first language standard | integer, real, double precision, complex and logical types; arithmetic and logical IF, computed GO TO, DO with a label, FORMAT, COMMON, EQUIVALENCE, DATA, BLOCK DATA, statement functions, Hollerith constants. No character type |
| FORTRAN 77 | ANSI X3.9-1978; ISO 1539:1980 | the CHARACTER type and substrings; block IF with ELSE IF and ELSE; OPEN, CLOSE, INQUIRE, direct-access and internal files, list-directed input and output; PARAMETER, SAVE, INTRINSIC, ENTRY, alternate return; IMPLICIT; generic intrinsics; general expressions as subscripts and loop limits; the Subset FORTRAN level. The 1978 text has 49 characters in the character set and 72-column fixed form |
| Fortran 90 | ISO/IEC 1539:1991 (ANSI X3.198-1992) | free form; MODULEs; derived types; array syntax and the array intrinsics; ALLOCATABLE, POINTER and ALLOCATE; kind parameters; interface blocks and generic names; optional and keyword arguments; recursion; SELECT CASE; DO … END DO, EXIT, CYCLE; WHERE; INTENT; ::; relational symbols; NAMELIST; INCLUDE; internal procedures; IMPLICIT NONE; bit intrinsics; the obsolescent features list |
| Fortran 95 | ISO/IEC 1539-1:1997 | FORALL, nested and masked WHERE; PURE and ELEMENTAL procedures; default initialisation of derived-type components; NULL(); CPU_TIME; the first deleted features |
| Fortran 2003 | ISO/IEC 1539-1:2004 | object orientation (type extension, polymorphism with CLASS, type-bound procedures, ABSTRACT, FINAL); parameterised derived types; procedure pointers; C interoperability; IEEE floating-point modules; ISO_FORTRAN_ENV; stream, asynchronous and user-defined derived-type I/O, FLUSH, IOMSG; allocatable components and arguments, automatic reallocation, deferred-length characters; ASSOCIATE, SELECT TYPE; PROTECTED, VALUE, VOLATILE, IMPORT; [ ] array constructors; command-line and environment access |
| Fortran 2008 | ISO/IEC 1539-1:2010 | coarrays; submodules; DO CONCURRENT; BLOCK; CRITICAL; CONTIGUOUS; ERROR STOP; NEWUNIT=; EXIT from any construct; G0 edit descriptor; ranks up to 15; Bessel, gamma, error and HYPOT, NORM2 functions; new bit procedures; FINDLOC; EXECUTE_COMMAND_LINE; IMPURE; type specification in array constructors and ALLOCATE with MOLD=; the INT8 … REAL128 kind constants |
| Fortran 2018 | ISO/IEC 1539-1:2018 | the two technical specifications below: further C interoperability (assumed-type, assumed-rank, ISO_Fortran_binding.h), and teams, events, failed images, collectives and atomics; SELECT RANK; IMPLICIT NONE (TYPE, EXTERNAL); locality specifiers of DO CONCURRENT; IMPORT options; RANDOM_INIT, REDUCE, OUT_OF_RANGE; the EX edit descriptor; STOP QUIET=; NON_RECURSIVE; more IEEE procedures; some features deleted, more made obsolescent (below) |
| Fortran 2023 | ISO/IEC 1539-1:2023 | conditional expressions and arguments (? :); SIMPLE procedures; ENUMERATION TYPE; TYPEOF and CLASSOF; trigonometric functions in degrees and half-turns; SPLIT and TOKENIZE; SELECTED_LOGICAL_KIND; REDUCE locality for DO CONCURRENT; free-form lines up to 10 000 characters; clarifications and corrections of the 2018 text |
The lists above are a summary and not complete. Sources read for this page: the FORTRAN 77 standard text (the plain-text copy of ANSI X3.9-1978), the GNU Fortran manual and Wikipedia’s Fortran article; the J3 working drafts of Fortran 2003, 2008, 2018 and 2023 were downloaded but could not be text-extracted here, so claims about them are from memory and secondary sources. Each is marked in Not described.
Technical reports and specifications
- MIL-STD-1753 (1978, United States Department of Defense):
DO WHILE,END DO,INCLUDE,IMPLICIT NONE, the bit procedures. A de facto extension of FORTRAN 77 and part of Fortran 90 - ISO/IEC TR 15581 (allocatable enhancements): allocatable components and dummy arguments. Part of Fortran 2003
- ISO/IEC TR 19767 (enhanced module facilities): submodules. Part of Fortran 2008
- ISO/IEC TS 29113 (further interoperability with C): assumed-type and assumed-rank dummy arguments and C descriptors. Part of Fortran 2018
- ISO/IEC TS 18508 (additional parallel features): teams, events, failed images, collectives, atomics. Part of Fortran 2018
- ISO/IEC 1539-2 (varying-length character strings,
ISO_VARYING_STRING) and 1539-3 (conditional compilation, coco): separate parts of the standard, little used - High Performance Fortran (HPF 1.0, 1993): a data-parallel dialect with
!HPF$directives, now historical
Deleted and obsolescent features
A deleted feature is no longer in the standard (compilers usually still accept it); an obsolescent feature is in the standard but its use is discouraged and it may be deleted later.
| Feature | Status |
|---|---|
real and double precision DO variables, branching to END IF from outside, PAUSE, ASSIGN and assigned GO TO, assigned format specifiers, the H edit descriptor | obsolescent in Fortran 90, deleted in Fortran 95 |
arithmetic IF, shared DO termination, a DO not ended by END DO or CONTINUE | obsolescent in Fortran 90; reported as deleted in Fortran 2018 |
computed GO TO, statement functions, DATA statements among executable statements, assumed-length character functions, fixed source form, the CHARACTER* form of declaration, alternate return | obsolescent from Fortran 95 |
| vertical format control for formatted output (carriage control by the first character) | deleted in Fortran 2003 |
FORALL, COMMON and EQUIVALENCE, BLOCK DATA, the labelled DO, specific names of intrinsic functions | reported as obsolescent in Fortran 2018 |
The last two rows are from secondary sources (Wikipedia’s summary of the standards); the standards’ own Annex B was not read, so these should be checked against it. In practice every compiler still accepts all of the above.
Dialects and vendor languages
- VAX and DEC Fortran, later Compaq and Intel Fortran:
STRUCTURE,RECORD,UNION,%VAL,DO … END DObefore 1990, tab format,Dlines,BYTE,.XOR.,ACCEPT,TYPE,ENCODEandDECODE,NAMELISTwith$groups,INTEGER*nandREAL*n,IMPLICIT UNDEFINED,'FF'Xconstants - Cray Fortran: Cray pointers, vector directives, autotasking
CMIC$andCDIR$lines - IBM:
@PROCESSand!IBM*directives,REAL*16, the VS FORTRAN extensions of System/360 and 370,XL Fortran - Microsoft Fortran and Watcom:
$metacommands,INCLUDEwith$INCLUDE: - CUDA Fortran and OpenACC Fortran (NVIDIA, formerly Portland Group)
- GNU Fortran: its
-std=options (f95,f2003,f2008,f2018,f2023,gnu,legacy) refuse features of later standards or accept older ones
More in Extensions and dialects.
Compilers
GNU Fortran (gfortran, part of GCC); Intel Fortran (ifx, the LLVM-based compiler, and the older ifort); LLVM Flang (flang); NVIDIA HPC nvfortran; Cray, NAG, IBM XL, Arm, AMD AOCC, Fujitsu, Absoft and the
community compiler LFortran. Their manuals say which part of each standard they support: for GNU Fortran, the status pages under “Standards” in its manual.