SlideShare a Scribd company logo
Fortran
Jordan Martin
Steven Devine
Background
•Developed by IBM in the 1950s
•Designed for use in scientific and engineering
fields
•Originally written as FORTRAN
–Convention is caps up to FORTRAN77
–Title caps for Fortran 90 forward
Background
•Brainchild of John Backus as a more friendly
and useable alternative to assembly language
•Fortran’s compiler, released in 1957, was the
first optimizing compiler.
Hello World
program hello
print *, "Hello World!"
end program hello
Current Usage
•Scientific Community
•Engineers
•Super Computing
Readability
•Pros
–Formulas and functions are easily recognizable
–Strongly typed.
–Looping and control statements work in familiar
ways in later versions of Fortran, using do as the
primary key word.
Readability
•Cons
–Case Insensitive
–Whitespace insensitive
–Many built-in functions and types, lacks high
orthogonality
–GOTO
–Column major order for 2D arrays
Writeability
•Pros
–Case insensitive
–Whitespace insensitive
–Powerful functions and algebraic evaluation
Writeability
•Cons
–GOTO is the basis for control structure in older
versions
–Names restricted to 6 characters
–Variables are in scope only for subroutines
Reliability
- The FORTRAN language has not specified evaluation order for expressions
- Compilers are free to evaluate each line as they please
PROGRAM ARGORD
INTEGER I, F1, F2, F3, F4
EXTERNAL F1, F2, F3, F4
WRITE (*,*) 'Evaluation order: '
I = F1(I) + F2(I) + F3(I) + F4(I)
END
Short Circuit Evaluation
-The compiler is free to evaluate boolean expressions in any order,
making short-circuit evaluation unreliable
-This code will either work as intended or crash, depending on the
compiler that was used
INTEGER I
REAL ARRAY(100)
...........................
IF ((I .GE. 1) .AND. (I .LE. 100) .AND. ARRAY(I) .GT. 0) THEN
WRITE (*,*) 'Array element is positive '
ENDIF
Strong Type Checking
- FORTRAN uses static (compile time) type checking
-At run time all variables in memory are bit strings without
data type information
-No type checking is done at run time, variables are just
accessed by the starting address of variable
Portability
-FORTRAN revisions are almost completely backwards-compatible and
have only removed obsolete instructions
-FORTRAN 90 introduced KIND type parameters, which are
variables can be declared with arbitrarily specified ranges and
precisions, eliminating platform-based data type issues
-An example of the KIND type:
real (kind=kind(0.0)) r
-kind(0.0) defaults to the processor's built in size for a real,
or the programmer can specify the number of digits
FORTRAN Exception Handling
- In FORTRAN, pointers cannot overlap in memory
- This is done to allow optimization for greater speed in numerical calculations
- All arrays passed to subroutines are guaranteed not to be aliased, so array
elements can be stored in registers for the duration of the subroutine
void transform (float *output, float * input, float * matrix, int n)
{
int i;
for (i=0; i<n; i++)
{
float x = input[i*2+0];
float y = input[i*2+1];
output[i*2+0] = matrix[0] * x + matrix[1] * y;
output[i*2+1] = matrix[2] * x + matrix[3] * y;
}
}
Cost
- Time spent learning a dying niche language
-There are free compilers available that vary in quality and output.
The expensive compilers offer tools and integration into modern programs
like .NET
-Legacy FORTRAN code can be difficult to read and refactor due to age.
Older FORTRAN programs may not have obeyed any recognizable
methodology. Also, GOTO statements.
Modern Uses
- A majority of supercomputers run programs written in FORTRAN
-Monster.com lists about fifty jobs that require FORTRAN experience.
Twenty of those fifty also require security clearance.
-FORTRAN is still the fastest when it comes to computationally-
intensive mathematical models, such as weather prediction,
computational science, air and fluid modeling, etc.
Parting Thoughts
-FORTRAN isn't unique. Everything FORTRAN does can also be done
by more powerful languages, starting with C
- FORTRAN is fast with mathematics, but Moore's Law is faster
-FORTRAN was an important step in programming languages,
but it now only caters to the niche market of High Performance Computing.
Sources
http://www.ibiblio.org/pub/languages/fortran/ch1-8.html
http://www.lahey.com/lookat90.htm
http://chronicle.com/blogs/wiredcampus/supercomputers-often-run-outdated-software/818
http://en.wikipedia.org/wiki/Row-major_order
http://fortran.com/

More Related Content

What's hot

Iterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop workingIterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop working
Neeru Mittal
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
Mohamed Tarek
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
Tushar Swami
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
Ahmed Sakr
 
Embedded C - Lecture 3
Embedded C - Lecture 3Embedded C - Lecture 3
Embedded C - Lecture 3
Mohamed Abdallah
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
TejaswiB4
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
avikdhupar
 
1.-Introduction-to-Dart.pdf
1.-Introduction-to-Dart.pdf1.-Introduction-to-Dart.pdf
1.-Introduction-to-Dart.pdf
SamySiddhan
 
Lesson 02 python keywords and identifiers
Lesson 02   python keywords and identifiersLesson 02   python keywords and identifiers
Lesson 02 python keywords and identifiers
Nilimesh Halder
 
Python : Data Types
Python : Data TypesPython : Data Types
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
Shuvongkor Barman
 
Python for loop
Python for loopPython for loop
Python for loop
Aishwarya Deshmukh
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
salmankhan570
 
Semaphores
SemaphoresSemaphores
Semaphores
Mohd Arif
 
Functions and modules in python
Functions and modules in pythonFunctions and modules in python
Functions and modules in python
Karin Lagesen
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
Aakashdata
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
THANDAIAH PRABU
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1
Mohamed Abdallah
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
ismailmrribi
 
Data types IN JAVA
Data types IN JAVAData types IN JAVA
Data types IN JAVA
garishma bhatia
 

What's hot (20)

Iterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop workingIterative control structures, looping, types of loops, loop working
Iterative control structures, looping, types of loops, loop working
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
RISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set ComputingRISC - Reduced Instruction Set Computing
RISC - Reduced Instruction Set Computing
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Embedded C - Lecture 3
Embedded C - Lecture 3Embedded C - Lecture 3
Embedded C - Lecture 3
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Basics of C programming
Basics of C programmingBasics of C programming
Basics of C programming
 
1.-Introduction-to-Dart.pdf
1.-Introduction-to-Dart.pdf1.-Introduction-to-Dart.pdf
1.-Introduction-to-Dart.pdf
 
Lesson 02 python keywords and identifiers
Lesson 02   python keywords and identifiersLesson 02   python keywords and identifiers
Lesson 02 python keywords and identifiers
 
Python : Data Types
Python : Data TypesPython : Data Types
Python : Data Types
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Python for loop
Python for loopPython for loop
Python for loop
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Functions and modules in python
Functions and modules in pythonFunctions and modules in python
Functions and modules in python
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
8051 MICROCONTROLLER
8051 MICROCONTROLLER 8051 MICROCONTROLLER
8051 MICROCONTROLLER
 
Embedded C - Lecture 1
Embedded C - Lecture 1Embedded C - Lecture 1
Embedded C - Lecture 1
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Data types IN JAVA
Data types IN JAVAData types IN JAVA
Data types IN JAVA
 

Similar to Fortran - concise review

intro2fortran.pptx
intro2fortran.pptxintro2fortran.pptx
intro2fortran.pptx
thomashughes837337
 
Lecture1_introduction to python.pptx
Lecture1_introduction to python.pptxLecture1_introduction to python.pptx
Lecture1_introduction to python.pptx
MohammedAlYemeni1
 
Uni texus austin
Uni texus austinUni texus austin
Uni texus austin
N/A
 
Intr fortran90
Intr fortran90Intr fortran90
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++
Manzoor ALam
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
javaTpoint s
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
Koan-Sin Tan
 
Fortran 95
Fortran 95Fortran 95
Fortran 95
Zaahir Salam
 
JVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, WixJVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, Wix
Codemotion Tel Aviv
 
Usp notes
Usp notesUsp notes
Usp notes
subash prakash
 
First compailer written
First compailer writtenFirst compailer written
First compailer written
microwoorkers
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
Sangharsh agarwal
 
Interm codegen
Interm codegenInterm codegen
Interm codegen
Anshul Sharma
 
Python programming
Python programmingPython programming
Python programming
saroja20
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON
 
Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...
Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...
Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...
Marjuk Ahmed Siddiki
 
Brief introduction to the c programming language
Brief introduction to the c programming languageBrief introduction to the c programming language
Brief introduction to the c programming language
Kumar Gaurav
 
gayathri.p.pptx
gayathri.p.pptxgayathri.p.pptx
gayathri.p.pptx
GayathriP95
 
Recursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreRecursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, Bangalore
Bhasker Kode
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
guest5de1a5
 

Similar to Fortran - concise review (20)

intro2fortran.pptx
intro2fortran.pptxintro2fortran.pptx
intro2fortran.pptx
 
Lecture1_introduction to python.pptx
Lecture1_introduction to python.pptxLecture1_introduction to python.pptx
Lecture1_introduction to python.pptx
 
Uni texus austin
Uni texus austinUni texus austin
Uni texus austin
 
Intr fortran90
Intr fortran90Intr fortran90
Intr fortran90
 
02 functions, variables, basic input and output of c++
02   functions, variables, basic input and output of c++02   functions, variables, basic input and output of c++
02 functions, variables, basic input and output of c++
 
C programming language tutorial
C programming language tutorial C programming language tutorial
C programming language tutorial
 
A Peek into TFRT
A Peek into TFRTA Peek into TFRT
A Peek into TFRT
 
Fortran 95
Fortran 95Fortran 95
Fortran 95
 
JVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, WixJVM Memory Model - Yoav Abrahami, Wix
JVM Memory Model - Yoav Abrahami, Wix
 
Usp notes
Usp notesUsp notes
Usp notes
 
First compailer written
First compailer writtenFirst compailer written
First compailer written
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Interm codegen
Interm codegenInterm codegen
Interm codegen
 
Python programming
Python programmingPython programming
Python programming
 
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
44CON London 2015 - Reverse engineering and exploiting font rasterizers: the ...
 
Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...
Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...
Python Programming Full Course || Beginner to Intermediate || Bangla (বাংলা) ...
 
Brief introduction to the c programming language
Brief introduction to the c programming languageBrief introduction to the c programming language
Brief introduction to the c programming language
 
gayathri.p.pptx
gayathri.p.pptxgayathri.p.pptx
gayathri.p.pptx
 
Recursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, BangaloreRecursion & Erlang, FunctionalConf 14, Bangalore
Recursion & Erlang, FunctionalConf 14, Bangalore
 
Cpcs302 1
Cpcs302  1Cpcs302  1
Cpcs302 1
 

More from Hans Zimermann

Campo eletrico lei_de_gauss-fsc1075
Campo eletrico lei_de_gauss-fsc1075Campo eletrico lei_de_gauss-fsc1075
Campo eletrico lei_de_gauss-fsc1075
Hans Zimermann
 
Fortran apresentacao-2018-01
Fortran apresentacao-2018-01Fortran apresentacao-2018-01
Fortran apresentacao-2018-01
Hans Zimermann
 
Galvanometro e multimetro
Galvanometro e multimetroGalvanometro e multimetro
Galvanometro e multimetro
Hans Zimermann
 
NBR-IEC-60479-1
NBR-IEC-60479-1NBR-IEC-60479-1
NBR-IEC-60479-1
Hans Zimermann
 
Apresentação1 2016-01
Apresentação1 2016-01Apresentação1 2016-01
Apresentação1 2016-01
Hans Zimermann
 
Dissertacao-Hans
Dissertacao-HansDissertacao-Hans
Dissertacao-Hans
Hans Zimermann
 
ZIMERMANN, HANS ROGERIO
ZIMERMANN, HANS ROGERIOZIMERMANN, HANS ROGERIO
ZIMERMANN, HANS ROGERIO
Hans Zimermann
 

More from Hans Zimermann (7)

Campo eletrico lei_de_gauss-fsc1075
Campo eletrico lei_de_gauss-fsc1075Campo eletrico lei_de_gauss-fsc1075
Campo eletrico lei_de_gauss-fsc1075
 
Fortran apresentacao-2018-01
Fortran apresentacao-2018-01Fortran apresentacao-2018-01
Fortran apresentacao-2018-01
 
Galvanometro e multimetro
Galvanometro e multimetroGalvanometro e multimetro
Galvanometro e multimetro
 
NBR-IEC-60479-1
NBR-IEC-60479-1NBR-IEC-60479-1
NBR-IEC-60479-1
 
Apresentação1 2016-01
Apresentação1 2016-01Apresentação1 2016-01
Apresentação1 2016-01
 
Dissertacao-Hans
Dissertacao-HansDissertacao-Hans
Dissertacao-Hans
 
ZIMERMANN, HANS ROGERIO
ZIMERMANN, HANS ROGERIOZIMERMANN, HANS ROGERIO
ZIMERMANN, HANS ROGERIO
 

Recently uploaded

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
MJDuyan
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
iammrhaywood
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
zuzanka
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
imrankhan141184
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
RidwanHassanYusuf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Vivekanand Anglo Vedic Academy
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
JomonJoseph58
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
haiqairshad
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 

Recently uploaded (20)

Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) CurriculumPhilippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
Philippine Edukasyong Pantahanan at Pangkabuhayan (EPP) Curriculum
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptxNEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
NEWSPAPERS - QUESTION 1 - REVISION POWERPOINT.pptx
 
SWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptxSWOT analysis in the project Keeping the Memory @live.pptx
SWOT analysis in the project Keeping the Memory @live.pptx
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
Traditional Musical Instruments of Arunachal Pradesh and Uttar Pradesh - RAYH...
 
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptxBIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
BIOLOGY NATIONAL EXAMINATION COUNCIL (NECO) 2024 PRACTICAL MANUAL.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDFLifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
Lifelines of National Economy chapter for Class 10 STUDY MATERIAL PDF
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Stack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 MicroprocessorStack Memory Organization of 8086 Microprocessor
Stack Memory Organization of 8086 Microprocessor
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skillsspot a liar (Haiqa 146).pptx Technical writhing and presentation skills
spot a liar (Haiqa 146).pptx Technical writhing and presentation skills
 
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 

Fortran - concise review

  • 2. Background •Developed by IBM in the 1950s •Designed for use in scientific and engineering fields •Originally written as FORTRAN –Convention is caps up to FORTRAN77 –Title caps for Fortran 90 forward
  • 3. Background •Brainchild of John Backus as a more friendly and useable alternative to assembly language •Fortran’s compiler, released in 1957, was the first optimizing compiler.
  • 4. Hello World program hello print *, "Hello World!" end program hello
  • 6. Readability •Pros –Formulas and functions are easily recognizable –Strongly typed. –Looping and control statements work in familiar ways in later versions of Fortran, using do as the primary key word.
  • 7. Readability •Cons –Case Insensitive –Whitespace insensitive –Many built-in functions and types, lacks high orthogonality –GOTO –Column major order for 2D arrays
  • 9. Writeability •Cons –GOTO is the basis for control structure in older versions –Names restricted to 6 characters –Variables are in scope only for subroutines
  • 10. Reliability - The FORTRAN language has not specified evaluation order for expressions - Compilers are free to evaluate each line as they please PROGRAM ARGORD INTEGER I, F1, F2, F3, F4 EXTERNAL F1, F2, F3, F4 WRITE (*,*) 'Evaluation order: ' I = F1(I) + F2(I) + F3(I) + F4(I) END
  • 11. Short Circuit Evaluation -The compiler is free to evaluate boolean expressions in any order, making short-circuit evaluation unreliable -This code will either work as intended or crash, depending on the compiler that was used INTEGER I REAL ARRAY(100) ........................... IF ((I .GE. 1) .AND. (I .LE. 100) .AND. ARRAY(I) .GT. 0) THEN WRITE (*,*) 'Array element is positive ' ENDIF
  • 12. Strong Type Checking - FORTRAN uses static (compile time) type checking -At run time all variables in memory are bit strings without data type information -No type checking is done at run time, variables are just accessed by the starting address of variable
  • 13. Portability -FORTRAN revisions are almost completely backwards-compatible and have only removed obsolete instructions -FORTRAN 90 introduced KIND type parameters, which are variables can be declared with arbitrarily specified ranges and precisions, eliminating platform-based data type issues -An example of the KIND type: real (kind=kind(0.0)) r -kind(0.0) defaults to the processor's built in size for a real, or the programmer can specify the number of digits
  • 14. FORTRAN Exception Handling - In FORTRAN, pointers cannot overlap in memory - This is done to allow optimization for greater speed in numerical calculations - All arrays passed to subroutines are guaranteed not to be aliased, so array elements can be stored in registers for the duration of the subroutine void transform (float *output, float * input, float * matrix, int n) { int i; for (i=0; i<n; i++) { float x = input[i*2+0]; float y = input[i*2+1]; output[i*2+0] = matrix[0] * x + matrix[1] * y; output[i*2+1] = matrix[2] * x + matrix[3] * y; } }
  • 15. Cost - Time spent learning a dying niche language -There are free compilers available that vary in quality and output. The expensive compilers offer tools and integration into modern programs like .NET -Legacy FORTRAN code can be difficult to read and refactor due to age. Older FORTRAN programs may not have obeyed any recognizable methodology. Also, GOTO statements.
  • 16. Modern Uses - A majority of supercomputers run programs written in FORTRAN -Monster.com lists about fifty jobs that require FORTRAN experience. Twenty of those fifty also require security clearance. -FORTRAN is still the fastest when it comes to computationally- intensive mathematical models, such as weather prediction, computational science, air and fluid modeling, etc.
  • 17. Parting Thoughts -FORTRAN isn't unique. Everything FORTRAN does can also be done by more powerful languages, starting with C - FORTRAN is fast with mathematics, but Moore's Law is faster -FORTRAN was an important step in programming languages, but it now only caters to the niche market of High Performance Computing.