FORTRAN. The History of Fortran Before Fortran there was a dark computing abyss Before Fortran there was a dark computing abyss Assembly was the only.

Slides:



Advertisements
Similar presentations
Module 6: Introduction to C Language ITEI102 Introduction to Programming Structure of C++ Program - Programming Terminologies - Microsoft Visual Studio.
Advertisements

Fortran Jordan Martin Steven Devine. Background Developed by IBM in the 1950s Designed for use in scientific and engineering fields Originally written.
Introduction to C++ September 12, Today’s Agenda Quick Review Check your programs from yesterday Another Simple Program: Adding Two Numbers Rules.
1 Key Concepts:  Why C?  Life Cycle Of a C program,  What is a computer program?  A program statement?  Basic parts of a C program,  Printf() function?
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
2.4 The Assignment Statement Values are assigned to variables using the assignment statement : variable = expression Examples: Ex.1: REAL :: XCoordinate,
Chapter 2: Introduction to C++.
Basic Elements of C++ Chapter 2.
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
COMPUTER SCIENCE I C++ INTRODUCTION
© The McGraw-Hill Companies, 2006 Chapter 1 The first step.
Introduction to FORTRAN
The Data Element. 2 Data type: A description of the set of values and the basic set of operations that can be applied to values of the type. Strong typing:
A Variable is symbolic name that can be given different values. Variables are stored in particular places in the computer ‘s memory. When a variable is.
Fortran 1- Basics Chapters 1-2 in your Fortran book.
Input & Output: Console
Computer Science 101 Introduction to Programming.
Five Tips to Success. Work hard Try more exercises and more practice.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley STARTING OUT WITH Python Python First Edition by Tony Gaddis Chapter 2 Input,
Input, Output, and Processing
Computer Science 101 Introduction to Programming.
FORTRAN FORmula TRANslator -Anand Trivedi. HISTORY  Designed and written from scratch in by an IBM team lead by John W. Backus as the first.
Chapter 8 High-Level Programming Languages. 8-2 Chapter Goals Describe the translation process and distinguish between assembly, compilation, interpretation,
Copyright © 2012 Pearson Education, Inc. Chapter 2: Introduction to C++
BASICS CONCEPTS OF ‘C’.  C Character Set C Character Set  Tokens in C Tokens in C  Constants Constants  Variables Variables  Global Variables Global.
Fortran 77 By Tanatorn Somboonvorakit, ID:
COMP 171: Data Types John Barr. Review - What is Computer Science? Problem Solving  Recognizing Patterns  If you can find a pattern in the way you solve.
1 Computer Science of Graphics and Games MONT 105S, Spring 2009 Session 1 Simple Python Programs Using Print, Variables, Input.
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 2: Introduction to C++
What is C? C is a programming language. It was developed in 1972 USA. It was designed and written by a man named dennis ritchie. C is the base for all.
A first program 1. #include 2. using namespace std; 3. int main() { 4. cout
8-1 Compilers Compiler A program that translates a high-level language program into machine code High-level languages provide a richer set of instructions.
Chapter 2 Variables.
Overview of C. C—a high-level programming language developed in 1972 by Dennis Ritchie at AT&T Bell Laboratories. We will discuss: –the elements of a.
Operators and Expressions. 2 String Concatenation  The plus operator (+) is also used for arithmetic addition  The function that the + operator performs.
Lecture III Start programming in Fortran Yi Lin Jan 11, 2007.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
C BASICS QUIZ (DATA TYPES & OPERATORS). C language has been developed by (1) Ken Thompson (2) Dennis Ritchie (3) Peter Norton (4) Martin Richards.
 Constants A constant is a fixed value of a data type that cannot be changed Integer Constants Whole numbers → Do not have decimal points Examples: 83.
CS201 Introduction to Sabancı University 1 Chapter 2 Writing and Understanding C++ l Writing programs in any language requires understanding.
COMPUTER PROGRAMMING Year 9 – Unit 9.04 Week 3. Open the Python INTERPRETER Can you use the interpreter to solve these maths problems? 156 add
Equations Inequalities = > 3 5(8) - 4 Numerical
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to C++
OPERATORS IN C CHAPTER 3. Expressions can be built up from literals, variables and operators. The operators define how the variables and literals in the.
FG Group -Afrilia BP -Liana F.B.I -Maulidatun Nisa -Riza Amini F.
2.1 The Part of a C++ Program. The Parts of a C++ Program // sample C++ program #include using namespace std; int main() { cout
Fundamentals of Programming I Overview of Programming
Chapter 2 Variables.
Chapter Topics The Basics of a C++ Program Data Types
Chapter 2 Introduction to C++ Programming
BASIC ELEMENTS OF A COMPUTER PROGRAM
Structured Programming
Basic Elements of C++.
Variables, Expressions, and IO
Chapter 3 Machine Language and Assembly Language.
Chapter 3 Machine Language and Assembly Language.
Basic Elements of C++ Chapter 2.
Variables In programming, we often need to have places to store data. These receptacles are called variables. They are called that because they can change.
Introduction to C++ Programming
Chapter 2 Variables.
High Level Programming Languages
CS150 Introduction to Computer Science 1
Chapter 2: Introduction to C++.
The Data Element.
The Data Element.
Chapter 2 Variables.
DATA TYPES There are four basic data types associated with variables:
DATA TYPES AND OPERATIONS
Python Creating a calculator.
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

FORTRAN

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

continued an IBM team led by John Backus an IBM team led by John Backus Nothing new Nothing new Extremely efficient optimizing compiler Extremely efficient optimizing compiler

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

Fortran II 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

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

Fortran IV Cleaned up Fortran II Cleaned up Fortran II Eliminated machine-dependent irregularities Eliminated machine-dependent irregularities

Fortran ASA standardized Fortran ASA standardized Fortran First HLL standard in the world First HLL standard in the world

More Fortran Fortran 77 improved on 66 Fortran 77 improved on … Disaster 1978… Disaster Fortran was caught up in political entanglements (Fortran Saga) Fortran was caught up in political entanglements (Fortran Saga) 1991 gave Fortran 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

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 , (0.6x10-3), 7E-3 Real numbers are , (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

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

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

Understanding Fortran 77 Program Example Program Example Columns 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

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 – – Statement Labels Continued characters or blank FORTRAN Statements Unused

Present Status The Array Language The Array Language The abstract data type The abstract data type Requirements Requirements

The Future Release Date Release Date Standards Standards

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.”

Source Michael Metcalf Michael Metcalf Paris, 1999 September Paris, 1999 September