Table of Contents
show
Procedural Programming
- A program is divided into subroutines that can access global data.
- To avoid repetition of code, each subroutine performs a well-defined task
- A subroutine that needs the service provided by another subroutine can call that subroutine
- Using ‘jump, ‘goto’ and ‘call’ instructions, the sequence of execution of instructions can be altered
- Example: FORTRAN, COBOL
Structure of Procedural Programming
Features
- Large Programs are divided in to small function or Procedure.
- Uses Top-Down programming Approach.
- Data moves freely from one function to another.
- Most of the functions share common data.
- Emphasis is given for algorithms.
Advantages
- The source code is portable, therefore, it can be used to target a different CPU as well
- The code can be reused in different parts of the program, without the need to copy it
- Through Procedural Programming technique, the memory requirement also slashes
- The program flow can be tracked easily
Disadvantages
- The Procedural code is often not reusable, which may pose the need to recreate the code if is needed to use in another application
- The importance is given to the operation rather than the data, which might pose issues in some data-sensitive cases
- The data is exposed to the whole program, making it not so much security friendly
Views: 1