75% developed


From Wikibooks, open books for an open world
Jump to navigation Jump to search

Origins[edit | edit source]

An IBM 704, the platform Fortran originally targeted at inception.

Fortran was created by a team lead by John Backus at IBM in 1957. Originally, the name was written in all capital letters, but current standards and implementations only require the first letter to be capital. The name Fortran stands for FORmula TRANslator. Initially it was specifically aimed at scientific calculations and thereby had very limited support for working with character strings and lacked other provisions important for a general purpose programming language, which it will attain later during its extensive development that ensued after its successful debut. Until the C language became popular, Fortran had been one of the few high level languages with a reasonable degree of portability between different computer systems. Several websites indicate that the work on Fortran was started in 1954 and released commercially in 1957. It is believed that the first successful compilation of a small Fortran program took place on September 20, 1954.

Fortran Versions[edit | edit source]

A programming language family tree, focusing on Fortran/Speedcoding and COBOL/FLOW-MATIC. Aside from contemporary versions of Fortran, many programming languages were influenced by early versions of Fortran.

There have been several versions of Fortran. FORTRAN I, II, III and IV are considered obsolete and contained many machine-dependent features. FORTRAN 66 was the first standardized version and was released in 1966. All later versions of Fortran are numbered after the year the standard was released. The versions of Fortran most commonly remaining in use are FORTRAN 77, Fortran 90 and later.

In FORTRAN II, IF statements had the form: IF (numeric_expression) label_if_negative, label_if_zero, label_if_positive. It also had an odd type of string literal, called Hollerith literals (after the inventor of the keypunch and IBM). Where today one might code 'hello', FORTRAN II used 5Hhello. However, there was no string variable type.

FORTRAN IV added the IF/THEN concept, the concept of logical expressions, with operators .AND., .OR., .EQ., .NE., et cetera. Complex numbers as a basic type were also added.

FORTRAN 77 added strings as a distinct type.

Fortran 90 added various sorts of threading, and direct array processing.

Fortran 2003 added object orientated features, derived types, language interoperability with C, data manipulation and many I/O enhancements.

Fortran 2008 added coarrays and parallelism and submodules.

Fortran 2018 added even more C interoperability and parallelism features.

Although Fortran became a standardized language early, many companies had their own extensions to it. Strangely, IBM and DEC had virtually the same set of extensions.

Differences between versions[edit | edit source]

Early versions of Fortran were often used in conjunction with punch cards. Contemporary Fortran versions bears little mind to obsolete formats, beginning with FORTRAN 90.
  • FORTRAN 66 comments are denoted by the C character in column 1, while FORTRAN 77 comments may also use * in column 1 instead. Fortran 90 also allows the use of ! character.
  • FORTRAN 77 symbolic names are limited to 6 character lengths, while Fortran 90 allows names up to 31 characters long.
  • FORTRAN 77 files need 6 spaces before words begin, while Fortran 90 doesn't (as it uses the free-form code style.)