Fortran (also FORTRAN) is a programming language originally developed in the 1950s and still in use today. The name is short for "Formula Translation". Early versions of the language were known as FORTRAN, but the capitalization has been dropped in newer revisions beginning with Fortran 90. The official language standards now refer to the language as "Fortran".
Fortran is mainly used for scientific computing and numerical analysis. Although originally a procedural language, recent versions of Fortran have included some features to support object-oriented programming.
The first FORTRAN compiler was developed for the IBM 704 in 1954-57 by an IBM team led by John W. Backus. This was an optimizing compiler, because the authors reasoned that no one would use the language if its performance was not comparable to assembly language.
The language was widely adopted by scientists for writing numerically intensive programs, which encouraged compiler writers to produce compilers that generate faster code. The inclusion of a complex number data type in the language made Fortran especially suited to scientific computation. There are many vendors of high performance Fortran compilers today. Many advances in the theory and design of compilers were motivated by the need to generate good code for Fortran programs.
Several revisions of the language have appeared, including the well-known FORTRAN IV (also known as FORTRAN 66), FORTRAN 77, and Fortran 90. The most recent formal standard for the language, published in 1997, is known as Fortran 95. IBM's versions were never as popular as those developed by others, which was especially true of FORTRAN IV -- WATFOR, the version of FORTRAN IV developed at the University of Waterloo, Canada, was universally preferred because it produced better reports of compilation errors. The software for automatically generating flow charts from FORTRAN programs was also developed outside IBM.
Initially, the language relied on precise formatting of the source code and heavy use of statement numbers and goto statements. These quirks have been removed from newer versions of the language. Successive versions also introduced 'modern' programming concepts, such as source code comments and output of text, IF-THEN-ELSE (in FORTRAN 77), recursion (in Fortran 90), and parallel constructs, while still attempting to maintain Fortran's 'lean' profile and high performance. Among the most popular specialized Fortran-based languages were SAS, for generating statistical reports, and SIMSCRIPT, for simulating processes involving queuing.
Vendors of high performance scientific computers (Burroughs, CDC, Cray, IBM, Texas Instruments, ...) added extensions to Fortran to make use of special hardware features such as: instruction cache, CPU pipeline, vector arrays, etc. For example, one of IBM's Fortran compilers (H Extended IUP) had a level of optimization which reordered the machine code instructions to keep several internal arithmetic units busy at the same time. Another example is CFD, a special 'version' of Fortran designed specifically for the ILLIAC IV supercomputer, running at NASA's Ames Research Center. These extensions have either disappeared over time or had elements incorporated into the main standard; the major remaining extension is OpenMP, which is a cross-platform extension for shared memory programming. One new extension, CoArray Fortran, is intended to promote parallel programming.
As what was basically a first attempt at designing a high-level language, the language's syntax is regarded as arcane by many programmers who learned more modern languages. It is difficult to write a lexical analyser for, and one-character mistakes can lead to runtime errors rather than compilation errors if more recent constructs such are not used. Some of the earlier versions, particularly, lacked facilities that would be regarded as useful in modern machines, such as dynamic memory allocation. At the same time, the syntax of Fortran has been tuned to scientific and numerical work, and many of its deficiencies have been addressed in more recent versions. For example, Fortran 95 has very short commands for performing mathematical operations on matrices and arrays which not only greatly improves program readability but also provides useful information to the compiler to enable it to vectorize operations. For these reasons, Fortran is not often used outside scientific and engineering numerical analysis, but remains the language of choice for high performance numerical computing.
|Table of contents
2 Code Sample (Hello, World)
3 External links
The two standards below reflect the current Fortran implementations.
Code Sample (Hello, World)
10 FORMAT('Hello, world!')