evolution of fortran - umu.sehpac.cs.umu.se/teaching/sem-lsc-12/evolutionfortran.pdfmore important...

Post on 05-May-2021

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Evolution of Fortran

Presented by:

Tauqeer Ahmad

Seminar on Languages for Scientific Computing

Outline (1)

Evolution of FORTRAN 2/21 Tauqeer Ahmad

History of Fortran

Versions

FORTRAN I

FORTRAN II

FORTRAN III

FORTRAN IV

FORTRAN 66

FORTRAN 77

Outline (2)

Tauqeer Ahmad Evolution of FORTRAN 3/21

Fortran 90

Fortran 95

Fortran 2003

Fortran 2008

Simple Fortran Program

Lifecycle of Fortran Program

History of Fortran

Stands for IBM Mathematical FORmula

TRANslation System but abbreviated to

FORmula TRANslation

FORTRAN 0 was developed by a IBM

research team headed by John Backus in

1954.

“Much of my work has come from being

lazy. I didn't like writing programs, and so,

when I was working on the IBM 701, writing

programs for computing missile trajectories, I

started work on a programming system to

make it easier to write programs.”

Was the first high-level programming

language.

John Backus 1924-1988

Evolution of FORTRAN 4/21 Tauqeer Ahmad

More History

The design of FORTRAN made it

easier to translate mathematical

formulas into code.

FORTRAN originally began as a

digital code interpreter for the IBM

701

At that time it was called Speed

coding

The point of FORTRAN was to

make programming easier.

FORTRAN is an

Imperative(Procedural) Language

like C, Ada and Pascal etc.

IBM 701

Evolution of FORTRAN 5/21 Tauqeer Ahmad

FORTRAN I

Was the first compiler

Was developed from scratch in 1954-1957

Cut development time.

2 weeks to 2 hours

Evolution of FORTRAN 6/21 Tauqeer Ahmad

FORTRAN II

It allowed to add user-written procedures and subroutines.

COMMON statement.

Fix the bugs.

Evolution of FORTRAN 7/21 Tauqeer Ahmad

FORTRAN III

Was developed, but never widely distributed

It made possible to use assembly code right in middle of FORTRAN code.

Such “inlined” code can be more efficient but advantages of High Level Language are lost.

Evolution of FORTRAN 8/21 Tauqeer Ahmad

FORTRAN IV

Removed the machine dependent features of

FORTRAN II e.g. READ INPUT TAPE.

Also added some new features.

Logical IF statement

Logical data type

Logical Boolean expressions

Released in 1962.

Evolution of FORTRAN 9/21 Tauqeer Ahmad

FORTRAN 66

First high level language standard in the world.

It included:

Types: integer, real, double precision, complex, logical

Arrays: up to 3 subscripts

Procedures: user-written and intrinsic

Permissive of extensions

Do loops

READ, WRITE statement for sequesntial I/O

Evolution of FORTRAN 10/21 Tauqeer Ahmad

FORTRAN 77 (1)

FORTRAN 77 replaced FORTRAN IV as the new

standard.

It retained most of the features of IV

It added

Character string handling

Logical loop control statements

And a If with a optional else statement

Recursion

Evolution of FORTRAN 11/21 Tauqeer Ahmad

FORTRAN 77 (2)

IMPLICIT statement

Character data type

Direct-access file I/O

Became out of date.

Evolution of FORTRAN 12/21 Tauqeer Ahmad

Fortran 90 (1)

Major revision:

Free source format input

Modern control structures

Precision specification

Whole array processing

Dynamic arrays

User defined types

Modules

Evolution of FORTRAN 13/21 Tauqeer Ahmad

Fortran 90 (2)

SELECT . . . CASE construct for multi-way selection

New and enhanced intrinsic procedures

Identifiers upto 31 character length

Inline comments

User written interface for generic procedures

Backward-compatible with FORTRAN 77.

Tauqeer Ahmad Evolution of FORTRAN 14/21

Fortran 95

Minor revision with these new features: FORALL, WHERE.

Clearly defined that ALLOCATABLE arrays are automatically deallocated when they go out of scope.

Pointer initialization.

Automatic component initialization.

Few small fixes. ASSIGN and assigned GOTO statement.

DO statements using REAL and DOUBLE PRECISION variables

Evolution of FORTRAN 15/21 Tauqeer Ahmad

Fortran 2003 (1)

Major revision with these new features:

Exception handling

Allocatable components and dummy

Arguments

Interoperability with C

Object-orientation: procedure pointers and structure

components, structure finalization.

Evolution of FORTRAN 16/21 Tauqeer Ahmad

Fortran 2003 (2)

Type extension and inheritance,

Polymorphism

Many minor enhancements

Tauqeer Ahmad Evolution of FORTRAN 17/21

Fortran 2008

Intended as a minor revision, but not as minor as for Fortran 95.

More important supplement of Fortran 2008 is ISO Technical Specification 29113 On further Interoperability of Fortran with C.

Evolution of FORTRAN 18/21 Tauqeer Ahmad

Simple Fortran Program

PROGRAM AddTwoNumbers

IMPLICIT NONE

REAL x, y, z

PRINT *, 'Enter two numbers to add:'

READ *, x, y

z = x + y

PRINT *, 'Result =', z

END PROGRAM AddTwoNumbers

Tauqeer Ahmad Evolution of FORTRAN 19/21

Lifecycle of Fortran Program

Tauqeer Ahmad Evolution of FORTRAN 20/21

FORTRAN

Program

FORTRAN

Compiler

Libraries

Link with

Libraries

Source Code Object Code Executable

Code

Execute

Program Test & Debug

Program

Make Changes

in Source Code

Bibliography

History of FORTRAN

http://en.wikipedia.org/wiki/Fortran

Handouts on FORTRAN Basics

http://www-solar.mcs.st-and.ac.uk/~steveb/course/notes/set2.pdf

ibiblio.org. A Brief History of FORTRAN.

http://www.ibiblio.org/pub/languages/fortran/ch1-1.html

Introduction and Basic FORTRAN

http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/intro.html

Evolution of FORTRAN 21/21 Tauqeer Ahmad

top related