Вы находитесь на странице: 1из 17

Fortran

F95 redirects here. For the Dsseldorf-based football


club, see Fortuna Dsseldorf.

Fortran (formerly FORTRAN, derived from For-


mula Translation[2] ) is a general-purpose, imperative
programming language that is especially suited to
numeric computation and scientic computing. Origi-
nally developed by IBM[3] in the 1950s for scientic and
engineering applications, Fortran came to dominate this
area of programming early on and has been in continuous
use for over half a century in computationally intensive
areas such as numerical weather prediction, nite element
analysis, computational uid dynamics, computational An IBM 704 mainframe computer
physics, crystallography and computational chemistry. It
is a popular language for high-performance computing[4]
and is used for programs that benchmark and rank the
Best, Harlan Herrick, Peter Sheridan, Roy Nutt, Robert
worlds fastest supercomputers.[5]
Nelson, Irving Ziller, Lois Haibt, and David Sayre.[6] Its
Fortran encompasses a lineage of versions, each of which concepts included easier entry of equations into a com-
evolved to add extensions to the language while usu- puter, an idea developed by J. Halcombe Laning and
ally retaining compatibility with prior versions. Suc- demonstrated in the Laning and Zierler system of 1952.[7]
cessive versions have added support for structured pro-
A draft specication for The IBM Mathematical Formula
gramming and processing of character-based data (FOR-
Translating System was completed by mid-1954. The rst
TRAN 77), array programming, modular programming
manual for FORTRAN appeared in October 1956, with
and generic programming (Fortran 90), high perfor-
the rst FORTRAN compiler delivered in April 1957.
mance Fortran (Fortran 95), object-oriented program-
This was the rst optimizing compiler, because customers
ming (Fortran 2003) and concurrent programming (For-
were reluctant to use a high-level programming language
tran 2008).
unless its compiler could generate code with performance
comparable to that of hand-coded assembly language.[8]
While the community was skeptical that this new method
1 Naming could possibly outperform hand-coding, it reduced the
number of programming statements necessary to operate
The names of earlier versions of the language through a machine by a factor of 20, and quickly gained accep-
FORTRAN 77 were conventionally spelled in all-capitals tance. John Backus said during a 1979 interview with
(FORTRAN 77 was the last version in which the use of Think, the IBM employee magazine, Much of my work
lowercase letters in keywords was strictly non-standard). has come from being lazy. I didn't like writing pro-
The capitalization has been dropped in referring to newer grams, and so, when I was working on the IBM 701, writ-
versions beginning with Fortran 90. The ocial language ing programs for computing missile trajectories, I started
standards now refer to the language as Fortran rather work on a programming system to make it easier to write
than all-caps FORTRAN. programs.[9]
The language was widely adopted by scientists for writ-
ing numerically intensive programs, which encouraged
2 History compiler writers to produce compilers that could gener-
ate faster and more ecient code. The inclusion of a
In late 1953, John W. Backus submitted a proposal to his complex number data type in the language made Fortran
superiors at IBM to develop a more practical alternative especially suited to technical applications such as electri-
to assembly language for programming their IBM 704 cal engineering.
mainframe computer. Backus historic FORTRAN team By 1960, versions of FORTRAN were available for the
consisted of programmers Richard Goldberg, Sheldon F. IBM 709, 650, 1620, and 7090 computers. Signicantly,

1
2 2 HISTORY

the increasing popularity of FORTRAN spurred compet- (CAS Compare AC with Storage), but using this in-
ing computer manufacturers to provide FORTRAN com- struction to implement the IF would consume 4 instruc-
pilers for their machines, so that by 1963 over 40 FOR- tion words, require the constant Zero in a word of storage,
TRAN compilers existed. For these reasons, FORTRAN and take 3 machine cycles to execute; using the Trans-
is considered to be the rst widely used programming lan- fer instructions to implement the IF could be done in 1
guage supported across a variety of computer architec- to 3 instruction words, required no constants in storage,
tures. and take 1 to 3 machine cycles to execute. An optimiz-
The development of FORTRAN paralleled the early evo- ing compiler like FORTRAN would most likely select
the more compact and usually faster Transfers instead of
lution of compiler technology, and many advances in the
theory and design of compilers were specically moti- the Compare (use of Transfers also allowed the FRE-
QUENCY statement to optimize IFs, which could not
vated by the need to generate ecient code for FOR-
TRAN programs. be done using the Compare). Also the Compare consid-
ered 0 and +0 to be dierent values while the Transfer
Zero and Transfer Not Zero considered them to be the
2.1 FORTRAN same. The FREQUENCY statement in FORTRAN was
used originally (and optionally) to give branch probabili-
The initial release of FORTRAN for the IBM 704 con- ties for the three branch cases of the arithmetic IF state-
tained 32 statements, including: ment. The rst FORTRAN compiler used this weighting
to perform at compile time a Monte Carlo simulation of
the generated code, the results of which were used to op-
DIMENSION and EQUIVALENCE statements timize the placement of basic blocks in memory a very
Assignment statements sophisticated optimization for its time. The Monte Carlo
technique is documented in Backus et al.'s paper on this
Three-way arithmetic IF statement, which passed original implementation, The FORTRAN Automatic Cod-
control to one of three locations in the program de- ing System:
pending on whether the result of the arithmetic state-
ment was negative, zero, or positive
The fundamental unit of program is the
IF statements for checking exceptions (ACCU- basic block; a basic block is a stretch of pro-
MULATOR OVERFLOW, QUOTIENT OVER- gram which has one entry point and one exit
FLOW, and DIVIDE CHECK); and IF statements point. The purpose of section 4 is to prepare
for manipulating sense switches and sense lights for section 5 a table of predecessors (PRED
table) which enumerates the basic blocks and
GO TO, computed GO TO, ASSIGN, and assigned
lists for every basic block each of the basic
GO TO
blocks which can be its immediate predeces-
DO loops sor in ow, together with the absolute fre-
quency of each such basic block link. This ta-
Formatted I/O: FORMAT, READ, READ INPUT ble is obtained by running the program once
TAPE, WRITE, WRITE OUTPUT TAPE, PRINT, in Monte-Carlo fashion, in which the outcome
and PUNCH of conditional transfers arising out of IF-type
statements and computed GO TO'S is deter-
Unformatted I/O: READ TAPE, READ DRUM, mined by a random number generator suit-
WRITE TAPE, and WRITE DRUM ably weighted according to whatever FRE-
QUENCY statements have been provided.[10]
Other I/O: END FILE, REWIND, and
BACKSPACE

PAUSE, STOP, and CONTINUE Many years later, the FREQUENCY statement had no ef-
fect on the code, and was treated as a comment statement,
FREQUENCY statement (for providing since the compilers no longer did this kind of compile-
optimization hints to the compiler). time simulation. A similar fate has befallen compiler hints
in several other programming languages; for example C's
The arithmetic IF statement was similar to a three-way register keyword.
branch instruction on the IBM 704. However, the 704 The rst FORTRAN compiler reported diagnostic infor-
branch instructions all contained only one destination ad- mation by halting the program when an error was found
dress (e.g., TZE Transfer AC Zero, TNZ Transfer and outputting an error code on its console. That code
AC Not Zero, TPL Transfer AC Plus, TMI Trans- could be looked up by the programmer in a error mes-
fer AC Minus). The machine (and its successors in the sages table in the operators manual, providing them with
700/7000 series) did have a three-way skip instruction a brief description of the problem.[11][12]
2.2 FORTRAN II 3

2.1.1 Fixed layout and punched cards restrictions due to limitations on their card readers.[14]
Keypunches could be programmed to tab to column 7
and skip out after column 72. Later compilers relaxed
most xed-format restrictions, and the requirement was
eliminated in the Fortran 90 standard.
Within the statement eld, whitespace characters
(blanks) were ignored outside a text literal. This allowed
omitting spaces between tokens for brevity or including
spaces within identiers for clarity. For example, AVG
OF X was a valid identier, equivalent to AVGOFX,
and 101010DO101I=1,101 was a valid statement,
equivalent to 10101 DO 101 I = 1, 101 because the zero
FORTRAN code on a punched card, showing the specialized uses
of columns 15, 6 and 7380
in column 6 is treated as if it were a space (!), while
101010DO101I=1.101 was instead 10101 DO101I =
Further information: Computer programming in the 1.101, the assignment of 1.101 to a variable called
punched card era DO101I. Note the slight visual dierence between a
comma and a period.

Before the development of disk les, text editors and ter- Hollerith strings, originally allowed only in FORMAT
minals, programs were most often entered on a keypunch and DATA statements, were prexed by a character count
keyboard onto 80-column punched cards, one line to a and the letter H (e.g., 26HTHIS IS ALPHANUMERIC
card. The resulting deck of cards would be fed into a DATA.), allowing blanks to be retained within the char-
card reader to be compiled. Punched-card codes included acter string. Miscounts were a problem.
no lower-case letters or many special characters, and spe-
cial versions of the IBM 026 keypunch were oered that
would correctly print the repurposed special characters 2.2 FORTRAN II
used in Fortran.
IBMs FORTRAN II appeared in 1958. The main en-
Reecting punched-card input practice, Fortran pro-
hancement was to support procedural programming by
grams were originally written in a xed-column format,
allowing user-written subroutines and functions which re-
with the rst 72 columns read into twelve 36-bit words.
turned values, with parameters passed by reference. The
A letter C in column 1 caused the entire card to be COMMON statement provided a way for subroutines to
treated as a comment and ignored by the compiler. Oth- access common (or global) variables. Six new statements
erwise, the columns of the card were divided into four were introduced:
elds:
SUBROUTINE, FUNCTION, and END
1 to 5 were the label eld: a sequence of digits here
was taken as a label for use in DO or control state- CALL and RETURN
ments such as GO TO and IF, or to identify a FOR-
MAT statement referred to in a WRITE or READ COMMON
statement. Leading zeros are ignored and 0 is not a
valid label number.
Over the next few years, FORTRAN II would also add
6 was a continuation eld: a character other than a support for the DOUBLE PRECISION and COMPLEX
blank or a zero here caused the card to be taken as data types.
a continuation of the statement on the prior card.
Early FORTRAN compilers supported no recursion in
7 to 72 served as the statement eld. subroutines. Early computer architectures supported no
concept of a stack, and when they did directly support
73 to 80 were ignored (the IBM 704s card reader subroutine calls, the return location was often stored in
only used 72 columns).[13] one xed location adjacent to the subroutine code (e.g.
the IBM 1130) or a specic machine register (IBM 360
Columns 73 to 80 could therefore be used for identica- et seq), which does not permit a subroutine to be called
tion information, such as punching a sequence number or again before a prior call of the subroutine has returned.
text, which could be used to re-order cards if a stack of Although not specied in Fortran 77, many F77 compil-
cards was dropped; though in practice this was reserved ers supported recursion as an option, and the Burroughs
for stable, production programs. An IBM 519 could be mainframes, designed with recursion built-in, did so by
used to copy a program deck and add sequence numbers. default. It became a standard in Fortran 90 via the new
Some early compilers, e.g., the IBM 650s, had additional keyword RECURSIVE.[15]
4 2 HISTORY

2.2.1 Simple FORTRAN II program IBM also developed a FORTRAN III in 1958 that allowed
for inline assembly code among other features; however,
This program, for Herons formula, reads data on a tape this version was never released as a product. Like the 704
reel containing three 5-digit integers A, B, and C as in- FORTRAN and FORTRAN II, FORTRAN III included
put. There are no type declarations available: variables machine-dependent features that made code written in it
whose name starts with I, J, K, L, M, or N are xed- unportable from machine to machine. Early versions of
point (i.e. integers), otherwise oating-point. If A, B, FORTRAN provided by other vendors suered from the
and C cannot represent the sides of a triangle in plane same disadvantage.
geometry, then the programs execution will end with an
error code of STOP 1. Otherwise, an output line will be
printed showing the input values for A, B, and C, followed 2.4 IBM 1401 FORTRAN
by the computed AREA of the triangle as a oating-point
number occupying ten spaces along the line of output and FORTRAN was provided for the IBM 1401 computer by
showing 2 digits after the decimal point, the .2 in F10.2 an innovative 63-phase compiler that ran entirely in its
of the FORMAT statement with label 601. core memory of only 8000 (6-bit) characters. The com-
piler could be run from tape, or from a 2200-card deck;
C AREA OF A TRIANGLE WITH A STANDARD it used no further tape or disk storage. It kept the pro-
SQUARE ROOT FUNCTION C INPUT - TAPE gram in memory and loaded overlays that gradually trans-
READER UNIT 5, INTEGER INPUT C OUTPUT - formed it, in place, into executable form, as described by
LINE PRINTER UNIT 6, REAL OUTPUT C INPUT Haines.[16] and in IBM document C24-1455. The exe-
ERROR DISPLAY ERROR OUTPUT CODE 1 IN JOB cutable form was not entirely machine language; rather,
CONTROL LISTING READ INPUT TAPE 5, 501, IA, oating-point arithmetic, subscripting, input/output, and
IB, IC 501 FORMAT (3I5) C IA, IB, AND IC MAY function references were interpreted, anticipating UCSD
NOT BE NEGATIVE OR ZERO C FURTHERMORE, Pascal P-code by two decades.
THE SUM OF TWO SIDES OF A TRIANGLE C
MUST BE GREATER THAN THE THIRD SIDE, SO IBM later provided a FORTRAN IV compiler for the
WE CHECK FOR THAT, TOO IF (IA) 777, 777, 701 1400 series of computers, described in IBM document
701 IF (IB) 777, 777, 702 702 IF (IC) 777, 777, 703 C24-3322.
703 IF (IA+IB-IC) 777, 777, 704 704 IF (IA+IC-IB)
777, 777, 705 705 IF (IB+IC-IA) 777, 777, 799 777
2.5 FORTRAN IV
STOP 1 C USING HERON'S FORMULA WE CAL-
CULATE THE C AREA OF THE TRIANGLE 799
Starting in 1961, as a result of customer demands, IBM
S = FLOATF (IA + IB + IC) / 2.0 AREA = SQRTF(
began development of a FORTRAN IV that removed the
S * (S - FLOATF(IA)) * (S - FLOATF(IB)) * + (S -
machine-dependent features of FORTRAN II (such as
FLOATF(IC))) WRITE OUTPUT TAPE 6, 601, IA,
READ INPUT TAPE), while adding new features such as
IB, IC, AREA 601 FORMAT (4H A= ,I5,5H B= ,I5,5H
a LOGICAL data type, logical Boolean expressions and
C= ,I5,8H AREA= ,F10.2, + 13H SQUARE UNITS)
the logical IF statement as an alternative to the arithmetic
STOP END
IF statement. FORTRAN IV was eventually released in
1962, rst for the IBM 7030 (Stretch) computer, fol-
lowed by versions for the IBM 7090, IBM 7094, and later
for the IBM 1401 in 1966.
2.3 FORTRAN III
By 1965, FORTRAN IV was supposed to be compli-
ant with the standard being developed by the American
Standards Association X3.4.3 FORTRAN Working
Group.[17]
At about this time FORTRAN IV had started to become
an important educational tool and implementations such
as the University of Waterloos WATFOR and WATFIV
were created to simplify the complex compile and link
processes of earlier compilers.

2.6 FORTRAN 66
Perhaps the most signicant development in the early
A FORTRAN coding form, printed on paper and intended to be history of FORTRAN was the decision by the Ameri-
used by programmers to prepare programs for punching onto can Standards Association (now American National Stan-
cards by keypunch operators. Now obsolete. dards Institute (ANSI)) to form a committee sponsored
2.7 FORTRAN 77 5

by BEMA, the Business Equipment Manufacturers As-


sociation, to develop an American Standard Fortran. The
resulting two standards, approved in March 1966, de-
ned two languages, FORTRAN (based on FORTRAN
IV, which had served as a de facto standard), and Basic
FORTRAN (based on FORTRAN II, but stripped of its
machine-dependent features). The FORTRAN dened
by the rst standard, ocially denoted X3.9-1966, be-
came known as FORTRAN 66 (although many continued
to term it FORTRAN IV, the language on which the stan-
dard was largely based). FORTRAN 66 eectively be-
came the rst industry-standard version of FORTRAN.
FORTRAN 66 included:

Main program, SUBROUTINE, FUNCTION, and


BLOCK DATA program units
INTEGER, REAL, DOUBLE PRECISION, COM-
PLEX, and LOGICAL data types
COMMON, DIMENSION, and EQUIVALENCE
statements
DATA statement for specifying initial values
Intrinsic and EXTERNAL (e.g., library) functions
Assignment statement FORTRAN-77 program with compiler output, written on a CDC
175 at RWTH Aachen University, Germany, in 1987
GO TO, computed GO TO, assigned GO TO, and
ASSIGN statements
Logical IF and arithmetic (three-way) IF statements
DO loop statement
READ, WRITE, BACKSPACE, REWIND, and
ENDFILE statements for sequential I/O
FORMAT statement and assigned format
CALL, RETURN, PAUSE, and STOP statements
Hollerith constants in DATA and FORMAT state-
ments, and as arguments to procedures 4.3 BSD for the Digital Equipment Corporation (DEC) VAX, dis-
playing the manual for FORTRAN 77 (f77) compiler
Identiers of up to six characters in length
Comment lines
77 and ocially denoted X3.9-1978, added a number of
END line signicant features to address many of the shortcomings
of FORTRAN 66:

2.7 FORTRAN 77
Block IF and END IF statements, with optional
After the release of the FORTRAN 66 standard, com- ELSE and ELSE IF clauses, to provide improved
piler vendors introduced several extensions to Standard language support for structured programming
Fortran, prompting ANSI committee X3J3 in 1969 to DO loop extensions, including parameter expres-
begin work on revising the 1966 standard, under spon- sions, negative increments, and zero trip counts
sorship of CBEMA, the Computer Business Equip-
ment Manufacturers Association (formerly BEMA). Fi- OPEN, CLOSE, and INQUIRE statements for im-
nal drafts of this revised standard circulated in 1977, proved I/O capability
leading to formal approval of the new FORTRAN stan-
dard in April 1978. The new standard, called FORTRAN Direct-access le I/O
6 2 HISTORY

IMPLICIT statement, to override implicit conven- 2.8 Transition to ANSI Standard Fortran
tions that undeclared variables are INTEGER if
their name begins with I, J, K, L, M, or N (and The development of a revised standard to succeed FOR-
REAL otherwise) TRAN 77 would be repeatedly delayed as the standard-
ization process struggled to keep up with rapid changes in
CHARACTER data type, replacing Hollerith computing and programming practice. In the meantime,
strings with vastly expanded facilities for character as the Standard FORTRAN for nearly fteen years,
input and output and processing of character-based FORTRAN 77 would become the historically most im-
data portant dialect.
An important practical extension to FORTRAN 77 was
PARAMETER statement for specifying constants
the release of MIL-STD-1753 in 1978.[19] This speci-
cation, developed by the U.S. Department of Defense,
SAVE statement for persistent local variables
standardized a number of features implemented by most
Generic names for intrinsic functions (e.g. SQRT FORTRAN 77 compilers but not included in the ANSI
also accepts arguments of other types, such as FORTRAN 77 standard. These features would eventu-
COMPLEX or REAL*16 ). ally be incorporated into the Fortran 90 standard.

A set of intrinsics (LGE, LGT, LLE, LLT) for lex- DO WHILE and END DO statements
ical comparison of strings, based upon the ASCII
collating sequence. (These ASCII functions were INCLUDE statement
demanded by the U.S. Department of Defense, in IMPLICIT NONE variant of the IMPLICIT state-
their conditional approval vote.) ment

In this revision of the standard, a number of features were Bit manipulation intrinsic functions, based on simi-
removed or altered in a manner that might invalidate for- lar functions included in Industrial Real-Time For-
merly standard-conforming programs. (Removal was the tran (ANSI/ISA S61.1 (1976))
only allowable alternative to X3J3 at that time, since the
concept of "deprecation" was not yet available for ANSI The IEEE 1003.9 POSIX Standard, released in 1991,
standards.) While most of the 24 items in the conict provided a simple means for FORTRAN 77 program-
list (see Appendix A2 of X3.9-1978) addressed loopholes mers to issue POSIX system calls.[20] Over 100 calls were
or pathological cases permitted by the prior standard but dened in the document allowing access to POSIX-
rarely used, a small number of specic capabilities were compatible process control, signal handling, le system
deliberately removed, such as: control, device control, procedure pointing, and stream
I/O in a portable manner.
Hollerith constants and Hollerith data, such as
GREET = 12HHELLO THERE! 2.9 Fortran 90
Reading into an H edit (Hollerith eld) descriptor in
The much delayed successor to FORTRAN 77, infor-
a FORMAT specication
mally known as Fortran 90 (and prior to that, Fortran
8X), was nally released as ISO/IEC standard 1539:1991
Overindexing of array bounds by subscripts
in 1991 and an ANSI Standard in 1992. In addition to
DIMENSION A(10,5) Y= A(11,1)
changing the ocial spelling from FORTRAN to For-
tran, this major revision added many new features to re-
ect the signicant changes in programming practice that
Transfer of control out of and back into the range of
had evolved since the 1978 standard:
a DO loop (also known as Extended Range)

Free-form source input, also with lowercase Fortran


2.7.1 Variants: Minnesota FORTRAN keywords

Identiers up to 31 characters in length (In the pre-


Control Data Corporation computers had another version
vious standard, it was only 6 characters).
of FORTRAN 77, called Minnesota FORTRAN (MNF),
designed especially for student use, with variations in out- Inline comments
put constructs, special uses of COMMONs and DATA
statements, optimizations code levels for compiling, and Ability to operate on arrays (or array sections) as a
detailed error listings, extensive warning messages, and whole, thus greatly simplifying math and engineer-
debugs.[18] ing computations.
2.10 Fortran 95 7

whole, partial and masked array assignment 2.9.2 Hello world example
statements and array expressions, such as
X(1:N)=R(1:N)*COS(A(1:N)) program helloworld print *, Hello world!" end program
WHERE statement for selective array assign- helloworld
ment
array-valued constants and expressions,
user-dened array-valued functions and array
2.10 Fortran 95
constructors.
Main article: Fortran 95 language features
RECURSIVE procedures
Fortran 95, published ocially as ISO/IEC 1539-1:1997,
Modules, to group related procedures and data to- was a minor revision, mostly to resolve some outstanding
gether, and make them available to other program issues from the Fortran 90 standard. Nevertheless, For-
units, including the capability to limit the accessi- tran 95 also added a number of extensions, notably from
bility to only specic parts of the module. the High Performance Fortran specication:
A vastly improved argument-passing mechanism, al-
lowing interfaces to be checked at compile time FORALL and nested WHERE constructs to aid vec-
torization
User-written interfaces for generic procedures
User-dened PURE and ELEMENTAL procedures
Operator overloading Default initialization of derived type components,
Derived (structured) data types including pointer initialization
Expanded the ability to use initialization expressions
New data type declaration syntax, to specify the data
for data objects
type and other attributes of variables
Initialization of pointers to NULL()
Dynamic memory allocation by means of the AL-
LOCATABLE attribute and the ALLOCATE and Clearly dened that ALLOCATABLE arrays are
DEALLOCATE statements automatically deallocated when they go out of scope.

POINTER attribute, pointer assignment, and NUL- A number of intrinsic functions were extended (for exam-
LIFY statement to facilitate the creation and manip- ple a dim argument was added to the maxloc intrinsic).
ulation of dynamic data structures
Several features noted in Fortran 90 to be obsolescent
Structured looping constructs, with an END DO were removed from Fortran 95:
statement for loop termination, and EXIT and CY-
CLE statements for terminating normal DO loop it- DO statements using REAL and DOUBLE PRECI-
erations in an orderly way SION index variables

SELECT . . . CASE construct for multi-way selec- Branching to an END IF statement from outside its
tion block

Portable specication of numerical precision under PAUSE statement


the users control ASSIGN and assigned GO TO statement, and as-
signed format speciers
New and enhanced intrinsic procedures.
H edit descriptor.

2.9.1 Obsolescence and deletions


An important supplement to Fortran 95 was the ISO tech-
nical report TR-15581: Enhanced Data Type Facilities,
Unlike the prior revision, Fortran 90 removed no fea- informally known as the Allocatable TR. This specica-
tures. (Appendix B.1 says, The list of deleted features in tion dened enhanced use of ALLOCATABLE arrays,
this standard is empty.) Any standard-conforming FOR- prior to the availability of fully Fortran 2003-compliant
TRAN 77 program is also standard-conforming under Fortran compilers. Such uses include ALLOCATABLE
Fortran 90, and either standard should be usable to de- arrays as derived type components, in procedure dummy
ne its behavior. argument lists, and as function return values. (ALLO-
A small set of features were identied as obsolescent CATABLE arrays are preferable to POINTER-based ar-
and expected to be removed in a future standard. rays because ALLOCATABLE arrays are guaranteed by
8 2 HISTORY

Fortran 95 to be deallocated automatically when they go Data manipulation enhancements: allocatable com-
out of scope, eliminating the possibility of memory leak- ponents (incorporating TR 15581), deferred type
age. In addition, elements of allocatable arrays are con- parameters, VOLATILE attribute, explicit type
tiguous, and aliasing is not an issue for optimization of ar- specication in array constructors and allocate state-
ray references, allowing compilers to generate faster code ments, pointer enhancements, extended initializa-
than in the case of pointers.[22] ) tion expressions, and enhanced intrinsic procedures
Another important supplement to Fortran 95 was the ISO Input/output enhancements: asynchronous transfer,
technical report TR-15580: Floating-point exception han- stream access, user specied transfer operations for
dling, informally known as the IEEE TR. This specica- derived types, user specied control of rounding
tion dened support for IEEE oating-point arithmetic during format conversions, named constants for pre-
and oating point exception handling. connected units, the FLUSH statement, regulariza-
tion of keywords, and access to error messages
2.10.1 Conditional compilation and varying length Procedure pointers
strings
Support for IEEE oating-point arithmetic and
In addition to the mandatory Base language (dened in oating point exception handling (incorporating TR
ISO/IEC 1539-1 : 1997), the Fortran 95 language also 15580)
includes two optional modules: Interoperability with the C programming language
Support for international usage: access to ISO
Varying length character strings (ISO/IEC 1539-2 :
10646 4-byte characters and choice of decimal or
2000)
comma in numeric formatted input/output
Conditional compilation (ISO/IEC 1539-3 : 1998) Enhanced integration with the host operating
system: access to command line arguments,
which, together, compose the multi-part International environment variables, and processor error mes-
Standard (ISO/IEC 1539). sages
According to the standards developers, the optional
parts describe self-contained features which have been An important supplement to Fortran 2003 was the ISO
requested by a substantial body of users and/or im- technical report TR-19767: Enhanced module facilities
plementors, but which are not deemed to be of in Fortran. This report provided submodules, which
sucient generality for them to be required in all make Fortran modules more similar to Modula-2 mod-
standard-conforming Fortran compilers. Nevertheless, ules. They are similar to Ada private child subunits. This
if a standard-conforming Fortran does provide such op- allows the specication and implementation of a mod-
tions, then they must be provided in accordance with the ule to be expressed in separate program units, which im-
description of those facilities in the appropriate Part of proves packaging of large libraries, allows preservation
the Standard. of trade secrets while publishing denitive interfaces, and
prevents compilation cascades.

2.11 Fortran 2003


2.12 Fortran 2008
Fortran 2003, ocially published as ISO/IEC 1539-
The most recent standard, ISO/IEC 1539-1:2010, infor-
1:2004, is a major revision introducing many new
mally known as Fortran 2008, was approved in Septem-
features.[23] A comprehensive summary of the new fea-
ber 2010.[25][26] As with Fortran 95, this is a minor up-
tures of Fortran 2003 is available at the Fortran Working
grade, incorporating clarications and corrections to For-
Group (ISO/IEC JTC1/SC22/WG5) ocial Web site.[24]
tran 2003, as well as introducing a select few new capa-
From that article, the major enhancements for this revi- bilities. The new capabilities include:
sion include:
Submodules additional structuring facilities for
Derived type enhancements: parameterized derived modules; supersedes ISO/IEC TR 19767:2005
types, improved control of accessibility, improved
Coarray Fortran a parallel execution model
structure constructors, and nalizers
The DO CONCURRENT construct for loop iter-
Object-oriented programming support: type exten- ations with no interdependencies
sion and inheritance, polymorphism, dynamic type
allocation, and type-bound procedures, providing The CONTIGUOUS attribute to specify storage
complete support for abstract data types layout restrictions
9

The BLOCK construct can contain declarations of almost all of the most widely used support libraries have
objects with construct scope been written in C and, more often, C++. Consequently, a
growing fraction of scientic code is also written in these
Recursive allocatable components as an alternative languages. For this reason, facilities for interoperation
to recursive pointers in derived types with C were added to Fortran 2003, and enhanced by
ISO/IEC technical specication 29113, which will be in-
The Final Draft international Standard (FDIS) is available corporated into Fortran 2015. This shift is also evident
as document N1830.[27] in the selection of applications between the SPEC CPU
2000 and SPEC CPU 2006 oating point benchmarks.
An important supplement to Fortran 2008 is the ISO
Technical Specication (TS) 29113 on Further Interop-
erability of Fortran with C,[28][29] which has been submit-
ted to ISO in May 2012 for approval. The specication 4 Language features
adds support for accessing the array descriptor from C
and allows ignoring the type and rank of arguments. The precise characteristics and syntax of Fortran 95 are
discussed in Fortran 95 language features.

2.13 Fortran 2015

The next revision of the language (Fortran 2015) is in-


5 Portability
tended to be a minor revision and is planned for release
in mid-2018.[30] It is currently planned to include further Portability was a problem in the early days because there
interoperability between Fortran and C, additional par- was no agreed standard not even IBMs reference man-
allel features, and the removal of simple deciencies in ual and computer companies vied to dierentiate their
and discrepancies between existing facilities.[31][32] oerings from others by providing incompatible features.
Standards have improved portability. The 1966 stan-
dard provided a reference syntax and semantics, but ven-
dors continued to provide incompatible extensions. Al-
3 Fortran and supercomputers though careful programmers were coming to realize that
use of incompatible extensions caused expensive porta-
Although a 1968 journal article by the authors of BASIC bility problems, and were therefore using programs such
already described Fortran as old-fashioned,[33] since as The PFORT Verier, it was not until after the 1977
Fortran has been in use for many decades, there is a standard, when the National Bureau of Standards (now
vast body of Fortran software in daily use throughout NIST) published FIPS PUB 69, that processors purchased
the scientic and engineering communities.[34] Jay Pasa- by the U.S. Government were required to diagnose exten-
cho wrote in 1984 that physics and astronomy stu- sions of the standard. Rather than oer two processors,
dents simply have to learn Fortran. So much exists in essentially every compiler eventually had at least an op-
Fortran that it seems unlikely that scientists will change tion to diagnose extensions.
to Pascal, Modula-2, or whatever.[35] In 1993, Cecil
E. Leith called Fortran the mother tongue of scien- Incompatible extensions were not the only portability
problem. For numerical calculations, it is important to
tic computing adding that its replacement by any other
possible language may remain a forlorn hope.[36] It take account of the characteristics of the arithmetic. This
was addressed by Fox et al. in the context of the 1966
is the primary language for some of the most intensive
supercomputing tasks, such as astronomy, weather and standard by the PORT library. The ideas therein became
widely used, and were eventually incorporated into the
climate modeling, numerical linear algebra (LAPACK),
numerical libraries (IMSL and NAG), structural engi- 1990 standard by way of intrinsic inquiry functions. The
neering, hydrological modeling, optimization, satellite widespread (now almost universal) adoption of the IEEE
simulation and data analysis, computational uid dynam- 754 standard for binary oating-point arithmetic has es-
ics, computational chemistry, computational economics sentially removed this problem.
and computational physics. Many of the oating-point Access to the computing environment (e.g., the programs
benchmarks to gauge the performance of new computer command line, environment variables, textual explana-
processors such as CFP2006, the oating-point compo- tion of error conditions) remained a problem until it was
nent of the SPEC CPU2006 benchmarks are written in addressed by the 2003 standard.
Fortran. Large collections of library software that could be de-
On the other hand, more modern code generally uses scribed as being loosely related to engineering and sci-
large program libraries such as PETSc or Trilinos for entic calculations, such as graphics libraries, have been
linear algebra capabilities, METIS for graph partition- written in C, and therefore access to them presented a
ing, deal.II or FEniCS for mesh and nite element sup- portability problem. This has been addressed by incor-
port, and other generic libraries. Since the late 1990s, poration of C interoperability into the 2003 standard.
10 6 VARIANTS

It is now possible (and relatively easy) to write an entirely Such machine-specic extensions have either disappeared
portable program in Fortran, even without recourse to a over time or have had elements incorporated into the main
preprocessor. standards. The major remaining extension is OpenMP,
which is a cross-platform extension for shared memory
programming. One new extension, Coarray Fortran, is
6 Variants intended to support parallel programming.

6.1 Fortran 5 6.4.1 FOR TRANSIT for the IBM 650

Fortran 5 was marketed by Data General Corp in the late FOR TRANSIT was the name of a reduced version of
1970s and early 1980s, for the Nova, Eclipse, and MV the IBM 704 FORTRAN language, which was imple-
line of computers. It had an optimizing compiler that was mented for the IBM 650, using a translator program de-
quite good for minicomputers of its time. The language veloped at Carnegie in the late 1950s.[39] The following
most closely resembles Fortran 66. The name is a pun on comment appears in the IBM Reference Manual (FOR
the earlier Fortran IV. TRANSIT Automatic Coding System C28-4038, Copyright
1957, 1959 by IBM):

6.2 Fortran V The FORTRAN system was designed for


a more complex machine than the 650, and
Fortran V was distributed by Control Data Corporation in consequently some of the 32 statements found
1968 for the CDC 6600 series. The language was based in the FORTRAN Programmers Reference
upon Fortran IV.[37] Manual are not acceptable to the FOR TRAN-
SIT system. In addition, certain restrictions
Univac also oered a compiler for the 1100 series known
to the FORTRAN language have been added.
as Fortran V. A spino of Univac Fortran V was Athena
However, none of these restrictions make a
Fortran.
source program written for FOR TRANSIT in-
compatible with the FORTRAN system for the
6.3 Fortran 6 704.

Fortran 6 or Visual Fortran 2001 was licensed to The permissible statements were:
Compaq by Microsoft. They have licensed Compaq Vi-
sual Fortran and have provided the Visual Studio 5 envi- Arithmetic assignment statements, e.g., a = b
ronment interface for Compaq v6 up to v6.1.[38]
GO to n
GO TO (n1 , n2 , ..., n ), i
6.4 Specic variants
IF (a) n1 , n2 , n3
Vendors of high-performance scientic computers (e.g.,
Burroughs, Control Data Corporation (CDC), Cray, PAUSE
Honeywell, IBM, Texas Instruments, and UNIVAC) STOP
added extensions to Fortran to take advantage of spe-
cial hardware features such as instruction cache, CPU DO n i = m1, m2
pipelines, and vector arrays. For example, one of
CONTINUE
IBMs FORTRAN compilers (H Extended IUP) had a
level of optimization which reordered the machine code END
instructions to keep multiple internal arithmetic units
busy simultaneously. Another example is CFD, a special READ n, list
variant of Fortran designed specically for the ILLIAC
PUNCH n, list
IV supercomputer, running at NASA's Ames Research
Center. IBM Research Labs also developed an extended DIMENSION V, V, V, ...
FORTRAN-based language called VECTRAN for pro-
cessing vectors and matrices. EQUIVALENCE (a,b,c), (d,c), ...
Object-Oriented Fortran was an object-oriented exten-
sion of Fortran, in which data items can be grouped into Up to ten subroutines could be used in one program.
objects, which can be instantiated and executed in paral- FOR TRANSIT statements were limited to columns 7
lel. It was available for Sun, Iris, iPSC, and nCUBE, but through 56, only. Punched cards were used for input and
is no longer supported. output on the IBM 650. Three passes were required to
11

translate source code to the IT language, then to com- The Fortran-95 Standard includes an optional Part 3
pile the IT statements into SOAP assembly language, and which denes an optional conditional compilation capa-
nally to produce the object program, which could then bility. This capability is often referred to as CoCo.
be loaded into the machine to run the program (using Many Fortran compilers have integrated subsets of the C
punched cards for data input, and outputting results onto preprocessor into their systems.
punched cards).
SIMSCRIPT is an application specic Fortran preproces-
Two versions existed for the 650s with a 2000 word mem-
sor for modeling and simulating large discrete systems.
ory drum: FOR TRANSIT I (S) and FOR TRANSIT II,
the latter for machines equipped with indexing registers The F programming language was designed to be a clean
and automatic oating point decimal (bi-quinary) arith- subset of Fortran 95 that attempted to remove the redun-
metic. Appendix A of the manual included wiring dia- dant, unstructured, and deprecated features of Fortran,
grams for the IBM 533 card reader/punch control panel. such as the EQUIVALENCE statement. F retains the
array features added in Fortran 90, and removes control
statements that were made obsolete by structured pro-
gramming constructs added to both Fortran 77 and For-
6.5 Fortran-based languages tran 90. F is described by its creators as a compiled,
structured, array programming language especially well
Prior to FORTRAN 77, a number of preprocessors were suited to education and scientic computing.[40]
commonly used to provide a friendlier language, with the
advantage that the preprocessed code could be compiled Lahey and Fujitsu teamed up to create Fortran for the
[41]
on any machine with a standard FORTRAN compiler. Microsoft .NET Framework. Silverfrost FTN95 is also
[42]
These preprocessors would typically support structured capable of creating .NET code.
programming, variable names longer than six charac-
ters, additional data types, conditional compilation, and
even macro capabilities. Popular preprocessors included
FLECS, iftran, MORTRAN, SFtran, S-Fortran, Ratfor,
7 Code examples
and Ratv. Ratfor and Ratv, for example, implemented
a C-like language, outputting preprocessed code in stan- For more details on this topic, see Wikibooks:
dard FORTRAN 66. Despite advances in the Fortran lan- Fortran/Fortran examples.
guage, preprocessors continue to be used for conditional
compilation and macro substitution. The following program illustrates dynamic memory al-
One of the earliest versions of FORTRAN, introduced in location and array-based operations, two features intro-
the 60s, was popularly used in colleges and universities. duced with Fortran 90. Particularly noteworthy is the ab-
Developed, supported, and distributed by the University sence of DO loops and IF/THEN statements in manipu-
of Waterloo, WATFOR was based largely on FORTRAN lating the array; mathematical operations are applied to
IV. A WATFOR student could submit their batch FOR- the array as a whole. Also apparent is the use of descrip-
TRAN job and, if there were no syntax errors, the pro- tive variable names and general code formatting that con-
gram would move straight to execution. This simplica- form with contemporary programming style. This exam-
tion allowed students to concentrate on their programs ple computes an average over data entered interactively.
syntax and semantics, or execution logic ow, rather than program average ! Read in some numbers and take
dealing with submission Job Control Language (JCL), the average ! As written, if there are no data points,
the compile/link-edit/execution successive process(es), an average of zero is returned ! While this may not
or other complexities of the mainframe/minicomputer be desired behavior, it keeps this example simple
environment. A down side to this simplied environment implicit none real, dimension(:), allocatable :: points
was that WATFOR was not a good choice for program- integer :: number_of_points real :: average_points=0.,
mers needing the expanded abilities of their host proces- positive_average=0., negative_average=0. write (*,*)
sor(s), e.g., WATFOR typically had very limited access Input number of points to average:" read (*,*) num-
to I/O devices. WATFOR was succeeded by WATFIV ber_of_points allocate (points(number_of_points))
and its later versions. write (*,*) Enter the points to average:" read (*,*)
program; s=0 i=1,n; s=s+1; stop i; s='s Stop points ! Take the average by summing points and
dividing by number_of_points if (number_of_points >
0) average_points = sum(points) / number_of_points
(line programing) ! Now form average over positive and negative points
LRLTRAN was developed at the Lawrence Radiation only if (count(points > 0.) > 0) then positive_average
Laboratory to provide support for vector arithmetic and = sum(points, points > 0.) / count(points > 0.) end
dynamic storage, among other extensions to support sys- if if (count(points < 0.) > 0) then negative_average
tems programming. The distribution included the LTSS = sum(points, points < 0.) / count(points < 0.) end
operating system. if deallocate (points) ! Print result to terminal write
12 10 REFERENCES

(*,'(a,g12.4)') 'Average = ', average_points write Matrix representation


(*,'(a,g12.4)') 'Average of positive points = ', posi-
tive_average write (*,'(a,g12.4)') 'Average of negative Row-major order
points = ', negative_average end program average

10 References
8 Humor [1] Chapel spec (Acknowledgements)" (PDF). Cray Inc.
2015-10-01. Retrieved 2016-01-14.
During the same Fortran standards committee meeting at [2] FORTRAN. American Heritage Dictionary of the En-
which the name FORTRAN 77 was chosen, a satirical glish Language (5 ed.). The Free Dictionary. 2011. Re-
technical proposal was incorporated into the ocial dis- trieved 2016-02-08.
tribution bearing the title Letter O Considered Harm-
ful". This proposal purported to address the confusion [3] John Backus. The history of FORTRAN I, II and III
that sometimes arises between the letter O and the nu- (PDF). Softwarepreservation.org. Retrieved 19 Novem-
ber 2014.
meral zero, by eliminating the letter from allowable vari-
able names. However, the method proposed was to elim- [4] Eugene Loh (18 June 2010). The Ideal HPC Program-
inate the letter from the character set entirely (thereby ming Language. Queue. Association of Computing Ma-
retaining 48 as the number of lexical characters, which chines. 8 (6).
the colon had increased to 49). This was considered
benecial in that it would promote structured program- [5] HPL A Portable Implementation of the High-
ming, by making it impossible to use the notorious GO Performance Linpack Benchmark for Distributed-
Memory Computers. Retrieved 2015-02-21.
TO statement as before. (Troublesome FORMAT state-
ments would also be eliminated.) It was noted that this [6] Softwarepreservation.org. Retrieved 22 September
might invalidate some existing programs but that most 2014.
of these probably were non-conforming, anyway.[43][44]
[7] Mindell, David, Digital Apollo, MIT Press, Cambridge
During the standards committee battle over whether the MA, 2008, p.99
minimum trip count for the FORTRAN 77 DO state-
ment should be zero (allowing no execution of the block) [8] The Fortran I Compiler The Fortran I compiler was the
or one (the plunge-ahead DO), another facetious alter- rst major project in code optimization. It tackled prob-
native was proposed (by Loren Meissner) to have the min- lems of crucial importance whose general solution was an
imum be two since there is no need for a loop if it is only important research focus in compiler technology for sev-
executed once. eral decades. Many classical techniques for compiler anal-
ysis and optimization can trace their origins and inspira-
When assumed-length arrays were being added, there was tion to the Fortran I compiler.
a dispute as to the appropriate character to separate up-
per and lower bounds. In a comment examining these [9] Fortran creator John Backus dies. msnbc.com. Re-
arguments, Dr. Walt Brainerd penned an article entitled trieved 19 November 2014.
Astronomy vs. Gastroenterology because some propo- [10] Backus, J. W.; H. Stern, I. Ziller, R. A. Hughes, R.
nents had suggested using the star or asterisk ("*"), while Nutt, R. J. Beeber, S. Best, R. Goldberg, L. M. Haibt,
others favored the colon (":"). H. L. Herrick, R. A. Nelson, D. Sayre, P. B. Sheridan
In Fortran 77, variable names beginning with the let- (1957). The FORTRAN Automatic Coding System.
Western joint computer conference: Techniques for relia-
ters IN had a default type of integer, while variables
bility. Los Angeles, California: Institute of Radio Engi-
starting with any other letters defaulted to real, although
neers, American Institute of Electrical Engineers, ACM:
programmers could override the defaults with an explicit 188198. doi:10.1145/1455567.1455599. Online at ,
declaration.[45] This led to the joke: In Fortran, GOD is
REAL (unless declared INTEGER). [11] Applied Science Division and Programming Research
Department, International Business Machines Corpora-
tion (October 15, 1956). The FORTRAN Automatic Cod-
ing System for the IBM 704 EDPM : Programmers Refer-
9 See also ence Manual (PDF). pp. 1920.

f2c [12] Programming Research Department, International Busi-


ness Machines Corporation (April 8, 1957). The FOR-
List of Fortran compilers TRAN Automatic Coding System for the IBM 704 EDPM :
Preliminary Operators Manual (PDF). pp. 637.
List of Fortran numerical libraries
[13] Reference Manual, IBM 7090 Data Processing System,
List of programming languages 1961, IBM A22-6528-3.
13

[14] Fortran II User Manual (PDF). Bitsavers.org. Retrieved [35] Pasacho, Jay M. (April 1984). Scientists: Fortran vs.
19 November 2014. Modula-2. BYTE (letter). p. 404. Retrieved 6 February
2015.
[15] Ibibilio.org. Ibiblio.org. Retrieved 15 September 2014.
[36] Galperin, Boris (1993). 26. Large Eddy Simulation of
[16] Haines, L. H. (1965). Serial compilation and the 1401 Complex Engineering and Geophysical Flows. London:
FORTRAN compiler. IBM Systems Journal. 4 (1): 73 Cambridgey. p. 573. ISBN 0-521-43009-7.
80. doi:10.1147/sj.41.0073. This article was reprinted,
edited, in both editions of Lee, John A. N. (1967). [37] Healy, MJR (1968). Towards FORTRAN VI. Ad-
Anatomy of a Compiler. Van Nostrand Reinhold. vanced scientic Fortran by CDC. CDC. pp. 169172.
Retrieved 10 April 2009.
[17] McCracken, Daniel D. (1965). Preface. A Guide to
FORTRAN IV Programming. New York: Wiley. p. v. [38] third party release notes for Fortran v6.1. Cs-
ISBN 0-471-58281-6. software.com. 15 March 2011. Retrieved 19 November
2014.
[18] FORTRAN Compilers and Loaders. Chilton-
programming.org.uk. Retrieved 19 November 2014. [39] Internal Translator (IT) A Compiler for the IBM 650,
by A. J. Perlis, J. W. Smith, and H. R. Van Zoeren, Com-
[19] Mil-std-1753. DoD Supplement to X3.9-1978. United putation Center, Carnegie Institute of Technology
States Government Printing Oce.
[40] F Programming Language Homepage. Fortran.com.
[20] Posix 1003.9-1992. POSIX FORTRAN 77 Language In- Retrieved 19 November 2014.
terface Part 1: Binding for System Application Program
[41] Fortran for .NET Language System.
Interface API. IEEE. Retrieved 19 November 2014.
[42] FTN95: Fortran 95 for Windows. Silverfrost.com. Re-
[21] Fortran Variable Declarations. Compaq Fortran. Texas, trieved 19 November 2014.
Huston, US: Compaq Computer Corporation. 1999. Re-
trieved 19 November 2014. The form CHARACTER*(*) [43] X3J3 post-meeting distribution for meeting held at
is an obsolescent feature in Fortran 95. Brookhaven National Laboratory in November 1976.

[22] Fortran 95 Reference. Gnu.Org. Retrieved 10 May [44] The obliteration of O, Computer Weekly, 3 March
2014. 1977.

[23] Fortran 2003- Last Working Draft. Gnu.Org. Retrieved [45] Rules for Data Typing (FORTRAN 77 Language Refer-
10 May 2014. ence)". docs.oracle.com. Retrieved 2016-09-29.

[24] Fortran Working Group (WG5). It may also be


downloaded as a PDF le or gzipped PostScript le,
FTP.nag.co.uk 11 Further reading
[25] N1836, Summary of Voting/Table of Replies on ISO/IEC Articles
FDIS 1539-1, Information technology Programming
languages Fortran Part 1: Base language
Allen, F.E. (September 1981). A History of Lan-
[26] Fortran 2008 Last Working Draft (PDF). Gnu.Org. guage Processor Technology in IBM. IBM Jour-
Retrieved 10 May 2014. nal of Research and Development. IBM. 25 (5).
doi:10.1147/rd.255.0535.
[27] N1830, Information technology Programming lan-
guages Fortran Part 1: Base language Backus, J. W.; H. Stern, I. Ziller, R. A. Hughes,
R. Nutt, R. J. Beeber, S. Best, R. Goldberg, L.
[28] ISO page to ISO/IEC DTS 29113, Further Interoperabil-
M. Haibt, H. L. Herrick, R. A. Nelson, D. Sayre,
ity of Fortran with C
P. B. Sheridan; Ziller, I.; Hughes, R. A.; Nutt,
[29] Draft of the Technical Specication (TS) 29113 R.; Beeber, R. J.; Best, S.; Goldberg, R.; Haibt,
L. M.; Herrick, H. L.; Nelson, R. A.; Sayre, D.;
[30] Doctor Fortran in One Door Closes"". Soft- Sheridan, P. B. (1957). The FORTRAN Auto-
ware.intel.com. Retrieved 21 September 2015.
matic Coding System. Western joint computer con-
[31] Doctor Fortran Goes Dutch: Fortran 2015. Soft- ference: Techniques for reliability. Los Angeles,
ware.intel.com. Retrieved 19 November 2014. California: Institute of Radio Engineers, American
Institute of Electrical Engineers, ACM: 188198.
[32] Fortran 2015 Working Document, 27 February 2017 doi:10.1145/1455567.1455599.
[33] Kemeny, John G.; Kurtz, Thomas E. (11 October 1968). Chivers, Ian D.; Sleightholme, Jane (2013).
Dartmouth Time-Sharing. Science. 162: 223228.
Compiler support for the Fortran 2003 & 2008
[34] Phillips, Lee. Scientic computings future: Can any standards. ACM SIGPLAN Fortran Forum. ACM.
coding language top a 1950s behemoth?". Ars Technica. 28 (1): 2628. doi:10.1145/1520752.1520755.
Retrieved 8 May 2014. ISSN 1061-7264.
14 11 FURTHER READING

Pigott, Diarmuid (2006). FORTRAN Backus et ECMA Standard on FORTRAN (PDF). European
al high-level compiler (Computer Language)". The Computer Manufacturers Association. April 1965.
Encyclopedia of Computer Languages. Murdoch Retrieved 2014-11-17.
University. Archived from the original on 8 October
2009. Retrieved 5 May 2010. FORTRAN 77 4.0 Reference Manual (PDF). Sun
Microsystems, Inc. 1995. Retrieved 2014-11-17.
Roberts, Mark L.; Griths, Peter D. (1985).
FORTRAN Coding Form (PDF). IBM. Retrieved
Design Considerations for IBM Personal Computer
2014-11-17.
Professional FORTRAN, an Optimizing Compiler
(PDF). IBM Systems Journal. IBM. 24 (1): 4960. IBM System/360 and System/370 Fortran IV Lan-
doi:10.1147/sj.241.0049. guage (PDF). International Business Machines.
May 1974. Retrieved 2014-11-17.
Core language standards
Goerz, Michael (2014). Modern Fortran Reference
Card (PDF). Retrieved 2014-12-14.
Ansi x3.9-1966. USA Standard FORTRAN (PDF).
American National Standards Institute. Informally
Textbooks
known as FORTRAN 66.

Ansi x3.9-1978. American National Standard Adams, Jeanne C.; Brainerd, Walter S.; Hendrick-
Programming Language FORTRAN. American Na- son, Richard A.; Maine, Richard E.; Martin, Jeanne
tional Standards Institute. Also known as ISO 1539- T.; Smith, Brian T. (2009). The Fortran 2003 Hand-
1980, informally known as FORTRAN 77. book (1st ed.). Springer. ISBN 978-1-84628-378-9.

ANSI X3.198-1992 (R1997) / ISO/IEC 1539:1991. Akin, Ed (2003). Object Oriented Programming
American National Standard Programming Lan- via Fortran 90/95 (1st ed.). Cambridge University
guage Fortran Extended. American National Stan- Press. ISBN 0-521-52408-3.
dards Institute / ISO/IEC. Archived from the orig-
Chapman, Stephen J. (2007). Fortran 95/2003 for
inal on 2002-05-01. Informally known as Fortran
Scientists and Engineers (3rd ed.). McGraw-Hill.
90.
ISBN 978-0-07-319157-7.
ISO/IEC 1539-1:1997. Information technology Chivers, Ian; Sleightholme, Jane (2015). Intro-
Programming languages Fortran Part 1: Base duction to Programming with Fortran (3rd ed.).
language (PDF). Informally known as Fortran 95. Springer. ISBN 978-3-319-17700-7.
There are a further two parts to this standard. Part
1 has been formally adopted by ANSI. Etter, D. M. (1990). Structured FORTRAN 77
for Engineers and Scientists (3rd ed.). The Ben-
ISO/IEC 1539-1:2004. Information technology jamin/Cummings Publishing Company, Inc. ISBN
Programming languages Fortran Part 1: Base 0-8053-0051-1.
language (PDF). Informally known as Fortran 2003.
Ellis, T. M. R.; Phillips, Ivor R.; Lahey, Thomas M.
ISO/IEC 1539-1:2010 (Final Draft International (1994). Fortran 90 Programming (1st ed.). Addison
Standard). Information technology Programming Wesley. ISBN 0-201-54446-6.
languages Fortran Part 1: Base language (PDF).
Informally known as Fortran 2008. Kupferschmid, Michael (2002). Classical Fortran:
Programming for Engineering and Scientic Applica-
tions. Marcel Dekker (CRC Press). ISBN 0-8247-
Related standards
0802-4.

Kneis, Wilfried (October 1981). Draft stan- McCracken, Daniel D. (1961). A Guide to FOR-
dard Industrial Real-Time FORTRAN". ACM TRAN Programming. New York: Wiley. LCCN
SIGPLAN Notices. ACM Press. 16 (7): 4560. 61016618.
doi:10.1145/947864.947868. ISSN 0362-1340.
Metcalf, Michael; John Reid; Malcolm Cohen
ISO 8651-1:1988 Information processing systems (2011). Modern Fortran Explained. Oxford Univer-
Computer graphics Graphical Kernel System (GKS) sity Press. ISBN 0-19-960142-9.
language bindings Part 1: FORTRAN. Geneva, Nyho, Larry; Sanford Leestma (1995). FORTRAN
Switzerland: ISO. 1988. 77 for Engineers and Scientists with an Introduction
to Fortran 90 (4th ed.). Prentice Hall. ISBN 0-13-
Other reference material 363003-X.
15

Page, Clive G. (1988). Professional Programmers


Guide to Fortran77 (7 June 2005 ed.). London: Pit-
man. ISBN 0-273-02856-1. Retrieved 4 May 2010.

Press, William H. (1996). Numerical Recipes in


Fortran 90: The Art of Parallel Scientic Comput-
ing. Cambridge, UK: Cambridge University Press.
ISBN 0-521-57439-0.

Sleighthome, Jane; Chivers, Ian David (1990).


Interactive Fortran 77: A Hands-On Approach.
Computers and their applications (2nd ed.). Chich-
ester: E. Horwood. ISBN 0-13-466764-6.

12 External links
ISO/IEC JTC1/SC22/WG5 the ocial home of
Fortran standards
Fortran Standards Documents GFortran standards

History of FORTRAN and Fortran II Computer


History Museum

FORTRAN Compilerator an online FORTRAN F


compiler for small experiments and tinkering
16 13 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

13 Text and image sources, contributors, and licenses


13.1 Text
Fortran Source: https://en.wikipedia.org/wiki/Fortran?oldid=777490528 Contributors: Damian Yerrick, AxelBoldt, Derek Ross, CYD,
Brion VIBBER, Mav, Uriyan, Robert Merkel, Tarquin, Gareth Owen, Drj, Andre Engels, Greg Lindahl, Roadrunner, Maury Markowitz,
Rcingham, Isis~enwiki, Leandrod, Frecklefoot, RTC, Michael Hardy, Chris~enwiki, Dan Koehl, Pnm, Lousyd, Tannin, Ixfd64, Takuya-
Murata, Williamv1138, Stevenj, Nanshu, Mark Foskey, Xamian, Julesd, Glenn, Poor Yorick, Nikai, Dcoetzee, Dmsar, Dysprosia, Rock-
ear, Jkj~enwiki, Espertus, Furrykef, Wernher, Bevo, Dpbsmith, David.Monniaux, Phil Boswell, Robbot, RedWolf, Geo97, Gantlord,
Larsivi, UtherSRG, Rege~enwiki, BenFrantzDale, Herbee, Dune, Zoltar0, Dav4is, Mboverload, Proslaes, Wiki Wikardo, MarkSweep,
Jossi, Vina, DNewhall, Karl-Henner, Howardjp, Gscshoyru, Urhixidur, Flex, Corti, Duja, Wcrowe, Rich Farmbrough, Misha Stepanov,
ArnoldReinhold, YUL89YYZ, Ericamick, Paul August, Cromis, Ylai, Bender235, ZeroOne, Andrejj, Kbh3rd, Closeapple, Danakil, Ylee,
Sccosel, Bobo192, AmosWolfe, Smalljim, Evolauxia, SnowRaptor, JW1805, Chbarts, The Recycling Troll, Vicarage, DBrane, Jumbuck,
Liao, Csabo, Walter Grlitz, Atlant, Ashley Pomeroy, Keavich, Wdfarmer, Suruena, Tony Sidaway, Lerdsuwa, H2g2bob, Sleigh, Blax-
thos, Dan100, Beliavsky, Kenyon, Oleg Alexandrov, A D Monroe III, Dejvid, Sandover, Woohookitty, Mindmatrix, LOL, DoctorWho42,
Mathmo, Wojciech.Aniszewski, Tripodics, Jacobolus, MattGiuca, Pol098, Rbcwa, Rchrd, Ruud Koot, KymFarnik, Kglavin, Wikiklrsc,
Tokek, Pmcjones, Paxsimius, MassGalactusUniversum, Graham87, BD2412, Qwertyus, Anarchivist, Grammarbot, Rjwilmsi, Rogerd,
Lese~enwiki, Strait, SMC, Changcho~enwiki, Gudeldar, Nneonneo, Ligulem, Bubba73, Yuletide, Rangek, Gringer, FlaBot, Who, GnniX,
Ewlyahoocom, ChongDae, Quuxplusone, Intgr, Windharp, Bobdc, Peterl, Jpfagerback, YurikBot, Wavelength, Wormholio, Hairy Dude,
Rowan Moore, Casey56, Hydrargyrum, Van der Hoorn, Okedem, Gaius Cornelius, The Cute Philosopher, DragonHawk, Jamesgibbon,
Ojcit, Howcheng, D. F. Schmidt, Mjchonoles, Aaron Schulz, Roy Brumback, Crumley, Cedar101, NHSavage, David Biddulph, Rwwww,
Sbassi, RupertMillard, SmackBot, NickyMcLean, WikiWookie, Reedy, Jrockley, Yamaguchi , Gilliam, Benjaminevans82, Betacom-
mand, Agateller, Thom2002, Bduke, Thumperward, Snori, EncMstr, Nbarth, Patrice Grandin~enwiki, KieferSkunk, Audriusa, Rogermw,
GeorgeMoney, Cybercobra, Derek R Bullamore, The morgawr, Mwtoews, DMacks, SashatoBot, Derek farn, Fireuzer, Rpropper, Chabala,
16@r, Waggers, Infologue, Mathchem271828, Norm mit, Dead3y3, Iridescent, Saxton, Twas Now, Smilitude, Jwmwalrus, Markbassett,
CRGreathouse, CmdrObot, Georg Peter, Raysonho, Dycedarg, Van helsing, Wws, Pgr94, Ironmagma, Cbmeeks, Cydebot, Dennette, Bryan,
MC10, Mortus Est, Muhandis, Bitsmart, Wilkowiki, Thijs!bot, Epbr123, Wikid77, JonEAhlquist, Luminifer, Headbomb, Marek69, Greg
L, Northumbrian, Escarbot, Kleb~enwiki, I already forgot, AntiVandalBot, Xlent, Widefox, Opelio, Knebel, VictorAnyakin, JAnDbot,
NapoliRoma, Eromana, Arch dude, Broh., VoABot II, Yakushima, Kajasudhakarababu, Nyttend, Taylock, Skew-t, Jvhertum, Van.snyder,
User A1, MarcusMaximus, Vssun, DerHexer, Tiuks, Eschnett, Seba5618, Gwern, Gjd001, Mr Wednesday, Mr.Fortran, Rigmahroll, Com-
monsDelinker, J.delanoy, Abeliavsky, RRawpower, Wikip rhyre, Salih, KylieTastic, Bashen, Inwind, WhiteOak2006, Funandtrvl, Unicorn-
Tapestry, VolkovBot, Maghnus, Aivosto, Philip Trueman, K-car, Muro de Aguas, Comrade Graham, Spacerat3004, Agricola44, T-bonham,
Corvus cornix, JhsBot, RedAndr, Gbuchana, Rako77, Raryel, IsaacGS, PDFbot, Robert1947, RiverStyx23, Robo.mind, DRady, Eu-
bulides, LanceBarber, Synthebot, Pthibault, Falcon8765, ParallelWolverine, Thestarsatnight, AlleborgoBot, LOTRrules, Quietbritishjim,
SieBot, Neuralwiki, BotMultichill, Bachcell, Eagleal, Stsp0269, Jerryobject, Android Mouse Bot 3, Mermaldad, AlanUS, ClueBot, Bad-
ger Drink, The Thing That Should Not Be, Edfredkin, DesertAngel, RobChafer, KenShirri, Alexbot, Alex Blokha, Plasynins, Eustress,
CMW275, Aitias, Ospix, DumZiBoT, InternetMeme, Smithck0, Little Mountain 5, Rudnei.cunha, Dekart, Addbot, Ghettoblaster, DOI
bot, AkhtaBot, Malaki1874, Numbo3-bot, Lightbot, Jarble, Meisam, Legobot, Quadrescence, Yobot, Bunnyhop11, Nghtwlkr, Sprach-
peger, II MusLiM HyBRiD II, AnomieBOT, Rubinbot, 1exec1, Jim1138, Wickorama, JackieBot, AdjustShift, McCulley1, Citation
bot, LilHelpa, Xqbot, Zicraccozian, RaveRaiser, Drilnoth, Brad Hughes, GrouchoBot, Captain Fortran, FrescoBot, NSH002, RS-Fighter,
D'ohBot, Flowerheaven, Wong, Xenfreak, Citation bot 1, Pinethicket, I dream of horses, ChrisJBenson, Tom.Reding, Skyerise, MastiBot,
Serols, SpaceFlight89, , Oligomous, Phrontis, Bethlehem4, FFM784, Lotje, Motorngers, Between My Ken, Iulian.serbanoiu, Emaus-
Bot, Look2See1, Joelwilliamson, Dourouc05, Sequentious, Primefac, Dcirovic, F, TheLupineOne, ChaosCon, Midas02, Zap Rowsdower,
Tolly4bolly, Donner60, SBaker43, Mister Mormon, Matthewdunsdon, Mikhail Ryazanov, ClueBot NG, Rravii, Snotbot, Frietjes, Ancantus,
Muon, O.Koslowski, Danim, Concentrate2, Ljn917, Helpful Pixie Bot, BG19bot, Jww19, Elopash, Rwgambill, EdwardH, Tjraptis, Batty-
Bot, Justincheng12345-bot, Miszatomic, ChrisGualtieri, Kietnguyen, Damian.rouson, Stsp0270, Declaration1776, Enamex, Jamesx12345,
Orriecather, Syamsunders, Sunnycolorado, Comp.arch, Huihermit, Vm-tieto, Konveyor Belt, Monkbot, Snd0, MegaDeltaXZ, Suspender
guy, EoRdE6, StewdioMACK, Surlycyborg, So-retro-it-hurts, Supporter of truth and logic, French horn 14, Kiwipidae, Wiznit02, Qzd,
InternetArchiveBot, Entranced98, GreenC bot, Chrissymad, Fmadd, Prahlad balaji and Anonymous: 446

13.2 Images
File:4.3_BSD_UWisc_VAX_Emulation_f77_Manual.png Source: https://upload.wikimedia.org/wikipedia/commons/b/b0/4.3_BSD_
UWisc_VAX_Emulation_f77_Manual.png License: CC0 Contributors: Own work Original artist: Huihermit
File:8bit-dynamiclist_(reversed).gif Source: https://upload.wikimedia.org/wikipedia/commons/c/cc/8bit-dynamiclist_%28reversed%
29.gif License: CC-BY-SA-3.0 Contributors: This le was derived from: 8bit-dynamiclist.gif
Original artist: Seahen, User:Rezonansowy
File:Folder_Hexagonal_Icon.svg Source: https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg License: Cc-by-
sa-3.0 Contributors: ? Original artist: ?
File:FortranCardPROJ039.agr.jpg Source: https://upload.wikimedia.org/wikipedia/commons/5/58/FortranCardPROJ039.agr.jpg Li-
cense: CC BY-SA 2.5 Contributors: I took this picture of an artifact in my possession. The card was created in the late 1960s or early 1970s
and has no copyright notice. Original artist: Arnold Reinhold
File:FortranCodingForm.png Source: https://upload.wikimedia.org/wikipedia/commons/1/18/FortranCodingForm.png License: Public
domain Contributors: Transferred from en.wikipedia to Commons by Sreejithk2000 using CommonsHelper. Original artist: Agateller at
English Wikipedia
File:Fortran_acs_cover.jpeg Source: https://upload.wikimedia.org/wikipedia/commons/0/07/Fortran_acs_cover.jpeg License: Public
domain Contributors: en:File:Fortran acs cover.jpeg Original artist: original uploader was en:User:Muhandis
File:Ftn-elim-1240x1709.jpg Source: https://upload.wikimedia.org/wikipedia/commons/e/ee/Ftn-elim-1240x1709.jpg License: CC
BY-SA 3.0 Contributors: Own work (including own program) Original artist: Phrontis
13.3 Content license 17

File:IBM_704_mainframe.gif Source: https://upload.wikimedia.org/wikipedia/commons/7/7d/IBM_704_mainframe.gif License: Attri-


bution Contributors: ? Original artist: Lawrence Livermore National Laboratory
File:Question_book-new.svg Source: https://upload.wikimedia.org/wikipedia/en/9/99/Question_book-new.svg License: Cc-by-sa-3.0
Contributors:
Created from scratch in Adobe Illustrator. Based on Image:Question book.png created by User:Equazcion Original artist:
Tkgd2007
File:Symbol_list_class.svg Source: https://upload.wikimedia.org/wikipedia/en/d/db/Symbol_list_class.svg License: Public domain Con-
tributors: ? Original artist: ?
File:Symbol_neutral_vote.svg Source: https://upload.wikimedia.org/wikipedia/en/8/89/Symbol_neutral_vote.svg License: Public do-
main Contributors: ? Original artist: ?
File:Wikibooks-logo-en-noslogan.svg Source: https://upload.wikimedia.org/wikipedia/commons/d/df/Wikibooks-logo-en-noslogan.
svg License: CC BY-SA 3.0 Contributors: Own work Original artist: User:Bastique, User:Ramac et al.
File:Wikiquote-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg License: Public domain
Contributors: Own work Original artist: Rei-artur

13.3 Content license


Creative Commons Attribution-Share Alike 3.0

Вам также может понравиться