Docsity

Procedural Programming Languages: A Historical Overview and Key Features, Study notes of Object Oriented Programming

Toggle sidebar
bg1
PROCEDURAL LANGUAGES
• Procedural languages are computer languages used to define the actions that a
computer has to follow to solve a problem. Although it would be convenient for
people to give computers instructions in a natural language, such as English,
French, or Chinese, they cannot because computers are just too inflexible to
understand the subtleties of human communication.
• The high-level form of a procedural language frees a programmer from the time-
consuming chore of expressing algorithms in lower-level languages such as
assembly and machine language.
• Higher-level languages work for people because they are closer to natural
language, translation into zeros and ones is taken care by compilers or
interpreters.
• A procedural language is either compiled or interpreted, depending on the use for
which it was created. Eg. FORTRAN uses compiler and BASIC uses Interpreter.
• Each programming language has a special vocabulary of keywords, which
correspond to specific operations or sequences of operations to be performed by
the computer
Features of Procedural programming:
1) Programs are organized in the form of subroutines and all data items are global.
2) Program controls are through jumps (gotos) and calls to subroutines.
3) Subroutines are abstracted to avoid repetitions
4) Suitable for medium sized software applications
5) Difficult to maintain and enhance the program code.
PAGE 1
pf3
pf4

Partial preview of the text

Download Procedural Programming Languages: A Historical Overview and Key Features and more Study notes Object Oriented Programming in PDF only on Docsity!

PROCEDURAL LANGUAGES

  • Procedural languages are computer languages used to define the actions that a computer has to follow to solve a problem. Although it would be convenient for people to give computers instructions in a natural language, such as English, French, or Chinese, they cannot because computers are just too inflexible to understand the subtleties of human communication.
  • The high-level form of a procedural language frees a programmer from the time- consuming chore of expressing algorithms in lower-level languages such as assembly and machine language.
  • Higher-level languages work for people because they are closer to natural language, translation into zeros and ones is taken care by compilers or interpreters.
  • A procedural language is either compiled or interpreted, depending on the use for which it was created. Eg. FORTRAN uses compiler and BASIC uses Interpreter.
  • Each programming language has a special vocabulary of keywords, which correspond to specific operations or sequences of operations to be performed by the computer

Features of Procedural programming:

  1. Programs are organized in the form of subroutines and all data items are global.
  2. Program controls are through jumps (gotos) and calls to subroutines.
  3. Subroutines are abstracted to avoid repetitions
  4. Suitable for medium sized software applications
  5. Difficult to maintain and enhance the program code.

FORTRAN

We can safely say that FORTRAN (FORmula TRANslator) was the first true high-level language.

  • FORTRAN I was released in 1957
  • FORTRAN II by 1958.
  • FORTRAN III depended heavily on the architecture of the IBM 704
  • FORTRAN IV, which was released in 1962. It added COMMON storage, double- precision and logical data types, and relational expressions as well as the DATA statements, which provided a simple facility to initialize variables.
  • FORTRAN 77 by 1968
  • FORTRAN 90 by 1991
  • FORTRAN 95 by 1995
  • FORTRAN 200X by 2001

ALGOL

  • ALGOL 58 in1958. was the first formal attempt to address issues of portability, and integrated the best features of programming languages available at the time. It introduced new terms such as: type, formal versus actual parameter, for statement, the begin end delimiters , and three levels of language description.
  • ALGOL 60, which was expected to become a universal tool with the addition of the following features: block, call by value and call by name, dynamic arrays, own variables, global and local variables, until, while, if then else, and recursion. COBOL

FORTRAN did not suit their needs because business programs deal with large quantities of data but do not perform complicated calculations.

  • COBOL programs are composed of four divisions, each one serving a specific purpose.
  • The IDENTIFICATION division serves to identify the program and programmer.
  • The ENVIRONMENT division is used to identify the actual computer, compiler, and peripheral devices that will be used by the program and it is the most machine dependent.
  • The DATA division describes the files, records, and fields used by the program.
  • Their goal was to create a language that would combine high-level structured language features with those that control low-level programming. This makes C well suited for writing operating systems, compilers, and also business applications.
  • C supports structured programming and provides for several data types.
  • Supports pointer and recursion
  • In addition to external, automatic and static variables, C provides register variables, which shorten execution time because they use registers.
  • C makes it possible to work on bit data using the bit operators for AND, OR, Exclusive OR, One's complement, SHIFT LEFT, and SHIFT RIGHT, giving programmers great control over data manipulation.