Here it is a brief history of the fortran language.
Fortran is a general-purpose, procedural, imperative programming language that is especially suited to numeric computation and scientific computing.
Fortran encompasses a lineage of versions, each of which evolved to add extensions to the language retaining compatibility with previous versions.
Successive versions have added support for processing of character-based data, array programming, modular programming and object-based programming and object-oriented
First FORTRAN
In late 1953, John W. Backus submitted a proposal to his superiors at IBM to develop a more practical alternative to assembly language for programming their IBM 704 mainframe computer. Backus' historic FORTRAN team consisted of programmers Richard Goldberg, Sheldon F. Best, Harlan Herrick, Peter Sheridan, Roy Nutt, Robert Nelson, Irving Ziller, Lois Haibt, and David Sayre.
The initial release of FORTRAN for the IBM 704 contained 32 statements, including:
- DIMENSION and EQUIVALENCE statements
- Assignment statements
- Three-way arithmetic IF statement.
- IF statements for checking exceptions (ACCUMULATOR OVERFLOW, QUOTIENT OVERFLOW, and DIVIDE CHECK); and IF statements for manipulating sense switches and sense lights
- GOTO, computed GOTO, ASSIGN, and assigned GOTO
- DO loops
- Formatted I/O: FORMAT, READ, READ INPUT TAPE, WRITE, WRITE OUTPUT TAPE, PRINT, and PUNCH
- Unformatted I/O: READ TAPE, READ DRUM, WRITE TAPE, and WRITE DRUM
- Other I/O: END FILE, REWIND, and BACKSPACE
- PAUSE, STOP, and CONTINUE
- FREQUENCY statement (for providing optimization hints to the compiler).
Before the development of disk files, text editors and terminals, programs were most often entered on a keypunch keyboard onto 80 column punched cards, one line to a card, which would be fed into a card reader in a batch.
FORTRAN II
IBM's FORTRAN II appeared in 1958. The main enhancement was to support procedural programming by allowing user-written subroutines and functions which returned values, with parameters passed by reference. The COMMON statement provided a way for subroutines to access common (or global) variables. Six new statements were introduced:
- SUBROUTINE
- FUNCTION
- END
- CALL
- RETURN
- COMMON
Over the next few years, FORTRAN II would also add support for the DOUBLE PRECISION and COMPLEX data types.
FORTRAN III
IBM also developed a FORTRAN III in 1958 that allowed for inline assembler code among other features; however, this version was never released as a product. Like the 704 FORTRAN and FORTRAN II, FORTRAN III included machine-dependent features that made code written in it unportable from machine to machine. Early versions of FORTRAN provided by other vendors suffered from the same disadvantage.
FORTRAN IV
Starting in 1961, as a result of customer demands, IBM began development of a FORTRAN IV that removed the machine-dependent features of FORTRAN II, while adding new features such as a LOGICAL data type, logical Boolean expressions and the logical IF statement as an alternative to the arithmetic IF statement. FORTRAN IV was eventually released in 1962, first for the IBM 7030 computer, followed by versions for the IBM 7090 and IBM 7094.
FORTRAN 66
Perhaps the most significant development in the early history of FORTRAN was the decision by the American Standards Association (now ANSI) to form a committee to develop an "American Standard Fortran." The resulting two standards, approved in March 1966, defined 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 defined by the first standard became known as FORTRAN 66 (although many continued to refer to it as FORTRAN IV, the language upon which the standard was largely based). FORTRAN 66 effectively became the first "industry-standard" version of FORTRAN. FORTRAN 66 included:
program units
- Main program
- SUBROUTINE
- FUNCTION
- BLOCK DATA
data types
- INTEGER
- REAL
- DOUBLE PRECISION
- COMPLEX
- LOGICAL
statements
- COMMON
- DIMENSION
- EQUIVALENCE
- DATA statement for specifying initial values
functions
Intrinsic and EXTERNAL (e.g., library)
Assignment statement
Flow
- GOTO
- assigned GOTO
- computed GOTO
- Logical IF
- arithmetic (three-way) IF statements
- DO loops
Sequential I/O
- READ
- WRITE
- BACKSPACE
- REWIND
- ENDFILE
- FORMAT statement
- CALL, RETURN, PAUSE, and STOP statements
- Hollerith constants in DATA and FORMAT statements, and as actual arguments to procedures
- Identifiers of up to six characters in length
- Comment lines
FORTRAN 77
After the release of the FORTRAN 66 standard, compiler vendors introduced a number of extensions to "Standard Fortran", prompting ANSI in 1969 to begin work on revising the 1966 standard. Final drafts of this revised standard circulated in 1977, leading to formal approval of the new FORTRAN standard in April 1978.
The new standard, known as FORTRAN 77, added a number of significant features to address many of the shortcomings of FORTRAN 66:
- Block IF and END IF statements, with optional ELSE and ELSE IF clauses, to provide improved language support for structured programming
- DO loop extensions, including parameter expressions, negative increments, and zero trip counts
- OPEN, CLOSE, and INQUIRE statements for improved I/O capability
- Direct-access file I/O
- IMPLICIT statement
- CHARACTER data type, with vastly expanded facilities for character input and output and processing of character-based data
- PARAMETER statement for specifying constants
- SAVE statement for persistent local variables
- Generic names for intrinsic functions
- A set of intrinsics (LGE, LGT, LLE, LLT) for lexical comparison of strings, based upon the ASCII collating sequence.
FORTRAN 90
The much delayed successor to FORTRAN 77, informally known as Fortran 90, was finally released as an ISO standard in 1991 and an ANSI Standard in 1992. This major revision added many new features to reflect the significant changes in programming practice that had evolved since the 1978 standard:
- 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.
- whole, partial and masked array assignment statements and array expressions, such as X(1:N)=R(1:N)*COS(A(1:N))
- WHERE statement for selective array assignment
- array-valued constants and expressions,
- user-defined array-valued functions and array constructors.
- 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 the ALLOCATE and DEALLOCATE statements
- POINTER attribute, pointer assignment, and NULLIFY statement to facilitate the creation and manipulation of dynamic data structures
- Structured looping constructs, with an END DO statement for loop termination, and EXIT and CYCLE statements for "breaking out" of normal DO 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.
Fortran 95 was a minor revision, but added a number of extensions, notably from the High Performance Fortran specification:
Fortran 2003, is a major revision introducing many new features. A comprehensive summary of the new features of Fortran 2003 is available at the Fortran Working Group (WG5) official Web site.
From that article, the major enhancements for this revision include:
- Derived type enhancements: parameterized derived types, improved control of accessibility, improved structure constructors, and finalizers.
- Object-oriented programming support: type extension and inheritance, polymorphism, dynamic type allocation, and type-bound procedures.
- Data manipulation enhancements: allocatable components (incorporating TR 15581), deferred type parameters, VOLATILE attribute, explicit type specification in array constructors and allocate statements, pointer enhancements, extended initialization expressions, and enhanced intrinsic procedures.
- Input/output enhancements: asynchronous transfer, stream access, user specified transfer operations for derived types, user specified control of rounding during format conversions, named constants for preconnected units, the FLUSH statement, regularization of keywords, and access to error messages.
- Procedure pointers.
- Support for IEEE floating-point arithmetic and floating point exception handling (incorporating TR 15580).
- Interoperability with the C programming language.
- Support for international usage: access to ISO 10646 4-byte characters and choice of decimal or comma in numeric formatted input/output.
- Enhanced integration with the host operating system: access to command line arguments, environment variables, and processor error messages.
Fortran 2008
Fortran 2008, was approved in September 2010 . As with Fortran 95, this is a minor upgrade, incorporating clarifications and corrections to Fortran 2003, as well as introducing a select few new capabilities. The new capabilities include:
- Submodules – Additional structuring facilities for modules; supersedes ISO/IEC TR 19767:2005
- Co-array Fortran – a parallel execution model
- The DO CONCURRENT construct – for loop iterations with no interdependencies
- The CONTIGUOUS attribute – to specify storage layout restrictions
- The BLOCK construct – can contain declarations of objects with construct scope
- Recursive allocatable components – as an alternative to recursive pointers in derived types
For more information visit http://en.wikipedia.org/wiki/Fortran from where I took most of these information.
Gg1
The early 1970's were a very interesting time in computer sciences. By mid decade, the argument over structured programming had given way to acceptance. But those of us who programmed in FORTRAN were left without structure naturally defined in the programming language. We were forced into using the dreaded GOTO.
Two colleagues, Tim Johnson and Ben Consilvio, and I set out to correct this failing. We defined a set of macros that executed within the University of Maryland Text Editor (med). The set of macros was named B4 (so called because it needed preprocessing before being submitted to the FORTRAN compiler). B4 and Rational FORTRAN had a lot in common. Code that was written in either dialect required preprocessing. The resulting transformed code was not related to what the programmer originally wrote (making debugging very difficult). But the advantages were significant.
Tim has corrected my recollection:
In 1977, all three of us were delighted when the ANSI FORTRAN Technical Committee announced the forthcoming American National Standard (ANS) FORTRAN, nicknamed "FORTRAN 77". The technical committee scheduled two public hearings, one on the West coast, the other on the East coast (at the National Institutes of Health campus, outside Washington DC). All three of us obtained a copy of the draft and set out reading about our new language. Almost immediately, it became apparent that FORTRAN 77 was nothing more than the old FORTRAN. There were no new structured constructs. GOTOs were inevitable. I can't describe the let down we all felt.
Because the East coast meeting was only an hour from our work, we decided to attend the public hearing. The morning was spent going over the draft ANS. Having read the draft, there were no surprises except to note that the West coast meeting had not addressed the lack of structured constructs in the draft. I was somewhat surprised that no one had raised the issue.
Come the afternoon and the question and answer period. Some attendees asked some technical questions. I waited at a balcony microphone. When the Chair recognized me, I identified myself and asked "Were the Technical Committee members unaware of or did they just ignore the current literature regarding structured programming?" The Chair was obviously not pleased and immediately recognized a gentleman at another balcony microphone. I was delighted when that questioner said "I want to hear your answer to his question." What followed was a rehash of the previous seven years of structured vs. non-structured programming. Finally, the Chair indicated that, because there were prior commitments for the auditorium, we would adjourn to the cafeteria. The discussion continued until early evening. But finally, the Chair indicated that a new draft would be distributed and that our comments were solicited.
The new draft arrived. It included the Block IF statement. It was acceptable although we may have wanted a slightly different set of keywords and a few more structures. So, that's why FORTRAN 77 wasn't official until late in 1978.
The B4 macros were dependent upon the University of Maryland Text Editor. In turn, the text editor was dependent upon the Univac computer (the editor was wholly written in Univac assembler). One of the B4 team, Ben Consilvio, decided to implement a FORTRAN preprocessor in FORTRAN. He told the story that ForMel, thought to mean "FORtran Made ELegant" really meant "For Mel". Mel was his manager who believed that such a beast could not be built. That ForMel was successful just demonstrates that renaissance men, like Ben, succeed at most of what they do.
Back when FORTRAN was first proposed, the alternative often wasn't as advanced as assembler; it was actually machine coding, what was called hand assembler at one point. The programmer had to code in some representation of binary, usually octal, understand where in memory the program would live, describe code and data memory locations directly, and code the op code as a numeric value, not symbolic. There were no labels for branching, just memory locations. FORTRAN was a huge leap forward, as was COBOL in a different problem space.
I fell in love with programming when I was introduced to Fortran 4 in 1972. At high school we had an IBM 1130 — used for front-office payroll, attendance reports, grades, etc — and used for one class at the senior level. After devouring that class I stayed on through the summer, equipped with a key to the raised floor, air-conditioned room (courtesy of the teacher), and spent each day after working at the supermarket programming away!
I wrote a program to play the card game Euchre on the 1130. It loaded the 18 inch high card deck, and then played 3 of the 4 players – I played the fourth one seated at the console (a Selectric typewriter). Let me tell you, I still remember the hassle in keeping track of the "Left Bower" in Euchre with variable names limited to one alphabetic and one numeric character, and 3-way IF statements. You could not check both the suit and the value of a card in one IF, and the Left Bower was a pain in the neck!
When I tired of programming for Euchre, I wrote another program to play 4-person Monopoly. In this case the 1130 played all four players, faithfully printing out each move on the LINE PRINTER. When the game ended I tore off the printout, took it home, setup the real game, and played it — reading each move from the paper. I remember having to work for a day or two making a long algebraic formula to estimate the rent on each property — according to its location and the number of houses or hotels. There were no two-dimensional arrays then … and maybe no arrays at all (can't recall).
Was I a nerd?
I moved on to Engineering school, where it was also still punch cards. We worked in PL/M, and I never went back to Fortran…. It was still my first love.
I was raised on FORTRAN and used it professionally until 1988. I then changed job & languages, never to return again. Thanks for the brief history. I'd lost track of where FORTRAN had gone.
Hi Greg,
FORTRAN is still here and many people code with this language. Sometimes, but not very often, I use FORTRAN 77 for work.
I've seen a lot of interest in FORTRAN language so I've published a new article about FORTRAN tools that are currently available on the internet
http://www.xappsoftware.com/wordpress/2010/12/17/fortran%E2%80%99s-sheikdom-tools-and-compilers/