Download presentation
Presentation is loading. Please wait.
1
FORTRAN
2
The History of Fortran Before Fortran there was a dark computing abyss Before Fortran there was a dark computing abyss Assembly was the only prominent language Assembly was the only prominent language Mostly due to extreme memory limitations Mostly due to extreme memory limitations
3
continued 1954-57 an IBM team led by John Backus 1954-57 an IBM team led by John Backus Nothing new Nothing new Extremely efficient optimizing compiler Extremely efficient optimizing compiler
4
continued The compiler was the key The compiler was the key The scientific and military communities adopted Fortran as a standard The scientific and military communities adopted Fortran as a standard Fortran required less skill to program in Fortran required less skill to program in Programs could be developed in much less time Programs could be developed in much less time NASA used Fortran extensively NASA used Fortran extensively
5
Fortran II 1958 1958 separate compilation of modules separate compilation of modules Assembly modules could be “link-loaded” by Fortran modules Assembly modules could be “link-loaded” by Fortran modules
6
Fortran III Never released to the public Never released to the public Assembly could be injected right in the middle of Fortran code Assembly could be injected right in the middle of Fortran code Lost HLL advantages when this happened Lost HLL advantages when this happened
7
Fortran IV 1961 1961 Cleaned up Fortran II Cleaned up Fortran II Eliminated machine-dependent irregularities Eliminated machine-dependent irregularities
8
Fortran 66 1962-66 ASA standardized Fortran 1962-66 ASA standardized Fortran First HLL standard in the world First HLL standard in the world
9
More Fortran Fortran 77 improved on 66 Fortran 77 improved on 66 1978… Disaster 1978… Disaster Fortran was caught up in political entanglements (Fortran Saga) Fortran was caught up in political entanglements (Fortran Saga) 1991 gave Fortran 90 1991 gave Fortran 90 Competition had caught up by this time Competition had caught up by this time Fortran 95 added minor improvements Fortran 95 added minor improvements
10
Understanding Fortran 77 Constants Constants Strings denoted with ‘ & ’ Strings denoted with ‘ & ’ Not “ & ” Not “ & ” Integers are 1, 2, 3 Integers are 1, 2, 3 Real numbers are -123.4, (0.6x10-3), 7E-3 Real numbers are -123.4, (0.6x10-3), 7E-3 Variable types Variable types 1-6 Characters per variable 1-6 Characters per variable All uppercase All uppercase All begin with an Alphabetic letter All begin with an Alphabetic letter
11
Understanding Fortran 77 Variable Typing Variable Typing INTEGER, CHARACTER, REAL INTEGER, CHARACTER, REAL Ex. INTEGER AGE, AGE5 Ex. INTEGER AGE, AGE5 Ex. CHARACTER NAME Ex. CHARACTER NAME READ Statement READ Statement Data input Data input Ex. READ *, NAME, AGE Ex. READ *, NAME, AGE PRINT Statement PRINT Statement Print data on the screen Print data on the screen Ex. PRINT *, ‘Hello ‘, NAME Ex. PRINT *, ‘Hello ‘, NAME Assignment Operator Assignment Operator AGE5 = AGE + 5 AGE5 = AGE + 5
12
Understanding Fortran 77 Arithmetic Operators Arithmetic Operators Evaluation Order Evaluation Order **, * /, + - (highest to lowest) **, * /, + - (highest to lowest) Spaces are ignored Spaces are ignored Ex. -1.0/X + Y/Z**2 Ex. -1.0/X + Y/Z**2 ML cannot do this ML cannot do this +Add -Subtract *Multiply /Divide **Exponential Expression Type Variable Type RuleINTEGERREAL Convert to REAL REALINTEGERTruncate
13
Understanding Fortran 77 Program Example Program Example Columns 1234567 - 72 C C Name and Age Program C PROGRAM EXPROG PROGRAM EXPROG CHARACTER NAME CHARACTER NAME INTEGER AGE, AGE5 INTEGER AGE, AGE5 C Input the name and age READ *, NAME, AGE READ *, NAME, AGE AGE5 = AGE + 5 AGE5 = AGE + 5 PRINT *, ’Hi ‘, NAME, ‘ Your age is ’ PRINT *, ’Hi ‘, NAME, ‘ Your age is ’ PRINT *, AGE, ‘ and in 5 years your age will be ‘ PRINT *, AGE, ‘ and in 5 years your age will be ‘ PRINT *, AGE5 PRINT *, AGE5
14
Understanding Fortran 77 Programs Programs Written in Columns Written in Columns Layout of punch cards Layout of punch cards Columns: Columns: Comments: Comments: Denoted by a ‘C’ or a ‘*’ in the 1 st column Denoted by a ‘C’ or a ‘*’ in the 1 st column 1 – 5 6 7 – 72 73 - 80 Statement Labels Continued characters or blank FORTRAN Statements Unused
15
Present Status The Array Language The Array Language The abstract data type The abstract data type Requirements Requirements
16
The Future Release Date Release Date Standards Standards
17
Quote “Fortran is likely to remain into the next century as, at the very least, a special- purpose scientific and numerical language for large-scale, computing-intensive applications; strengthen especially by its array capabilities, will be one of a small range of widely-used languages in general use.” “Fortran is likely to remain into the next century as, at the very least, a special- purpose scientific and numerical language for large-scale, computing-intensive applications; strengthen especially by its array capabilities, will be one of a small range of widely-used languages in general use.”
18
Source Michael Metcalf Michael Metcalf Paris, 1999 September Paris, 1999 September
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.