Procedure Oriented Programming Language

procedural programming

Procedural programming is a programming paradigm based upon the idea of a procedure call. Procedure calls are modular and are bound by scope. A procedural program is composed of one or more modules.

Each module is composed of one or more subprograms. Modules may consist of procedures, functions, subroutines or methods, depending on the programming language. Procedural programs may possibly have multiple levels or scopes, with subprograms defined inside other subprograms. Each scope can contain names which cannot be seen in outer scopes.

Procedural programming offers many benefits over simple sequential programming since procedural code:

  1. It is easier to read and more maintainable
  2. It is more flexible
  3. It facilitates the practice of good program design
  4. It allows modules to be reused in the form of code libraries

In the procedure oriented approach, the problem is viewed as sequence of things to be done such as reading , calculation and printing. Procedure oriented programming basically consist of writing a list of instruction or actions for the computer to follow and organizing these instruction into groups known as functions.

Main function in c++

In Procedural programming, data and functions (subroutines, procedures) are
kept separate from the data they process. This has a significant effect on the way a program handles data:

  1. The programmer must ensure that data are initialized with suitable values before use and that suitable data are passed to a function when it is called.
  2. If the data representation is changed, e.g. if a record is extended, the corresponding functions must also be modified.

The disadvantage of the procedure oriented programming languages is:

  • Global data access
  • It does not model real word problem very well
  • No data hiding

Characteristics of procedure oriented programming:

  1. Emphasis is on doing things(algorithm)
  2. Large programs are divided into smaller programs known as functions.
  3. Most of the functions share global data
  4. Data move openly around the system from function to function
  5. Function transforms data from one form to another.
  6. Employs top-down approach in program design

Related posts