Some Important Programming Languages

Slides:



Advertisements
Similar presentations
An Introduction to Programming General Concepts. What is a program? A program is an algorithm expressed in a programming language. programming language.
Advertisements

Imperative and functional programming languages UC Santa Cruz CMPS 10 – Introduction to Computer Science
The Analytical Engine Module 6 Program Translation.
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
The Evolution of Programming Languages
A Quick Overview of Languages. FORTRAN Designed in 1955 First release of the compiler in 1957 Algebraic in nature Scientific (numeric not string oriented)
6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall.
CS 415: Programming Languages Chapter 1 Aaron Bloomfield Fall 2005.
CS102 Introduction to Computer Programming
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
The Evolution of the Object Model OOAD. The Evolution of the Object Model software engineering trends observed The shift in focus from programming-in-the-small.
Programming language history Created by wordle.net, from the text in this slide.
COMPUTER PROGRAMS AND LANGUAGES Chapter 4. Developing a computer program Programs are a set (series) of instructions Programmers determine The instructions.
Visual BASIC 1 Introduction
Some Advanced Features of Procedures. Recursion Recursive Calls –A procedure can call itself (Self Recursion) –A can call B, B calls C, etc, Z calls A.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
INTRODUCTION TO COMPUTING CHAPTER NO. 04. Programming Languages Program Algorithms and Pseudo Code Properties and Advantages of Algorithms Flowchart (Symbols.
Fortran Fortran – Formula Translation –Developed by John Backus (IBM) in the mid 1950s. –It was a team effort and the design goal was to produce a translation.
Programming, an introduction to Pascal
Logical and Functional Programming
Introduction to programming Carl Smith National Certificate Year 2 – Unit 4.
Agenda Computer Languages How to Write a Simple C Program
Java FilesOops - Mistake Java lingoSyntax
Skill Area 311 Part B. Lecture Overview Assembly Code Assembler Format of Assembly Code Advantages Assembly Code Disadvantages Assembly Code High-Level.
Software Engineering Algorithms, Compilers, & Lifecycle.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
CPS120 Introduction to Computer Science High Level Language: Paradigms.
Introduction to Programming using Java Nod Palmer Steve Sheehy Union High School.
Advanced Higher Computing Science
Chapter 1. Introduction.
Chapter 5: Preparing C Programs
The Little man computer
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Negative Integers Unsigned binary representation can not be used to represent negative numbers. With paper and pencil arithmetic, a number is made negative.
Assembly Language Specific to each machine Extremely low level
Computer Programming (BCT 1113)
Lecture 1 Introduction Richard Gesick.
Algol 60 John Cowan N Languages in N Months Meetup June 7, 2016
Structured Programming
Programming For Nuclear Engineers Lecture 6 Arrays
Comp 205: Comparative Programming Languages
An Introduction to Programming
Other Kinds of Arrays Chapter 11
Lecture 2 Introduction to Programming
Computer Programming.
IPC144 Introduction to Programming Using C Week 2 – Lesson 1
Ada – 1983 History’s largest design effort
PROGRAMMING PARADIGMS
CSCE Fall 2013 Prof. Jennifer L. Welch.
Programming Languages
CSCE 121: Simple Computer Model Spring 2015
The Programming Process
High Level Programming Languages
Low Level Programming Languages
CSCE Fall 2012 Prof. Jennifer L. Welch.
Introduction to Computer Programming
and Program Development
Software Development Process
Language Translation Issues
Principles of Programming Languages
Language Translation Issues
An Introduction to Programming
Evolution of the Major Programming Languages
Language Translation Issues
Language Translation Issues
Arrays, Part 1 of 2 Topics Definition of a Data Structure
Language Translation Issues
Some Important Programming Languages
Presentation transcript:

Some Important Programming Languages CMPT 383 Spring 2018 (Surrey)

Fortran (1957) Fortran = Formula Translator Design by John Backus et al from IBM Designed to be easier to use than machine language 1st version for the IBM 704 Extremely popular with scientists and engineers Still in use today

C AREA OF A TRIANGLE WITH A STANDARD SQUARE ROOT FUNCTION C INPUT - TAPE READER UNIT 5, INTEGER INPUT C OUTPUT - LINE PRINTER UNIT 6, REAL OUTPUT C INPUT ERROR DISPLAY ERROR OUTPUT CODE 1 IN JOB CONTROL LISTING READ INPUT TAPE 5, 501, IA, IB, IC 501 FORMAT (3I5) C IA, IB, AND IC MAY NOT BE NEGATIVE OR ZERO C FURTHERMORE, THE SUM OF TWO SIDES OF A TRIANGLE C MUST BE GREATER THAN THE THIRD SIDE, SO WE CHECK FOR THAT, TOO IF (IA) 777, 777, 701 701 IF (IB) 777, 777, 702 702 IF (IC) 777, 777, 703 703 IF (IA+IB-IC) 777, 777, 704 704 IF (IA+IC-IB) 777, 777, 705 705 IF (IB+IC-IA) 777, 777, 799 777 STOP 1 C USING HERON'S FORMULA WE CALCULATE THE C AREA OF THE TRIANGLE 799 S = FLOATF (IA + IB + IC) / 2.0 AREA = SQRTF( S * (S - FLOATF(IA)) * (S - FLOATF(IB)) * + (S - FLOATF(IC))) WRITE OUTPUT TAPE 6, 601, IA, IB, IC, AREA 601 FORMAT (4H A= ,I5,5H B= ,I5,5H C= ,I5,8H AREA= ,F10.2, + 13H SQUARE UNITS) STOP END More Modern Fortran PROGRAM Fibonacci IMPLICIT NONE INTEGER :: FIRST, SECOND, TEMP, IX FIRST = 0 SECOND = 1 WRITE (*,*) FIRST WRITE (*,*) SECOND DO IX = 1, 45, 1 TEMP = FIRST + SECOND FIRST = SECOND SECOND = TEMP WRITE (*,*) TEMP END DO END PROGRAM Fibonacci

LISP (1958) LISP = List Processing Designed by John McCarthy and his students Designed for symbolic processing (e.g. calculating symbolic derivatives) and AI Extremely simply core language Pioneered many programming ideas Many dialects over the years Scheme is a dialect of LISP that we’ll use later in the course (defun factorial (n) (if (= n 0) 1 (* n (factorial (- n 1)))))

COBOL (1959) COBOL = Common Business-Oriented Language Associated with Rear Admiral Grace Hopper, who designed a predecessor called Flow-matic Specifically for business Extremely popular

IDENTIFICATION DIVISION. PROGRAM-ID. "Fibonacci". ENVIRONMENT DIVISION. DATA DIVISION. WORKING-STORAGE SECTION. 01 ix BINARY-C-LONG VALUE 0. 01 first-number BINARY-C-LONG VALUE 0. 01 second-number BINARY-C-LONG VALUE 1. 01 temp-number BINARY-C-LONG VALUE 1. 01 display-number PIC Z(19)9. PROCEDURE DIVISION. * This is the start of the program START-PROGRAM. MOVE first-number TO display-number. DISPLAY display-number. MOVE second-number TO display-number. PERFORM VARYING ix FROM 1 BY 1 UNTIL ix = 90 ADD first-number TO second-number GIVING temp-number MOVE second-number TO first-number MOVE temp-number TO second-number MOVE temp-number TO display-number DISPLAY display-number END-PERFORM. STOP RUN.

Algol Languages (1960s) Algol = Algorithmic Language Algol 60 Example Algol = Algorithmic Language Influential set of languages designed by a group of computer scientists (including Backus and McCarthy) Pioneered many now- standard language features (and more) No longer popular in practice, but still very influential procedure Absmax(a) Size:(n, m) Result:(y) Subscripts:(i, k); value n, m; array a; integer n, m, i, k; real y; comment The absolute greatest element of the matrix a, of size n by m is transferred to y, and the subscripts of this element to i and k; begin integer p, q; y := 0; i := k := 1; for p := 1 step 1 until n do for q := 1 step 1 until m do if abs(a[p, q]) > y then begin y := abs(a[p, q]); i := p; k := q end end Absmax

SmallTalk (1970s) Not the first object-oriented programming (OOP) language (that was SIMULA, from the 1960s) Developed by Alan Kay and his group at Xerox Parc But helped popularize OOP, especially in North America Squeak Code Example factorial "Answer the factorial of the receiver." self = 0 ifTrue: [^ 1]. self > 0 ifTrue: [^ self * (self - 1) factorial]. self error: 'Not valid for negative integers'

Prolog (1972) Prolog = Programming Logic Quicksort in Prolog Prolog = Programming Logic Declarative, logic-based, constraint-oriented Developed by Alain Colmerauer (although many others helped developed the underlying ideas) Certain complex problems have beautifully simple Prolog solutions Certain easy problems have ugly and complex Prolog solutions partition([], _, [], []). partition([X|Xs], Pivot, Smalls, Bigs) :- ( X @< Pivot -> Smalls = [X|Rest], partition(Xs, Pivot, Rest, Bigs) ; Bigs = [X|Rest], partition(Xs, Pivot, Smalls, Rest) ). quicksort([]) --> []. quicksort([X|Xs]) --> { partition(Xs, X, Smaller, Bigger) }, quicksort(Smaller), [X], quicksort(Bigger).