A module can consist of single or multiple procedures. These procedures are also known as functions, routines, subroutines, or methods in various programming languages.
A procedural program can consist of multiple levels or scopes. A procedure can be defined independently or within another procedure. The level of the procedure depends on the definition. Similarly, the data available in the procedure also exhibits various levels or scopes. The procedure of a higher or outer scope cannot access the data within the procedure that has lower or inner scope.
A procedure or a subprogram is a set of commands that can be executed independently. In a program following procedural methodology, each step of a subprogram is linked to the previous step.
For example, in a program that needs to accept, display, and print data, you can divide the program into subprograms. You can create three subprograms that accept data, display data, and print data, respectively. Each subprogram performs a defined function while the combined action of subprograms makes a complete program.
In procedural programming, you can use a subprogram at multiple locations within a program to perform a specific task.
This enables you to reuse the program code as and when required in a program, without rewriting the entire code, as shown in the figure:
The figure displays a program that consists of three procedures. Accept Data, Display Data, and Print Data. Data is accepted in the Accept Data procedure, displayed in the Display Data procedure, and printed in the Print Data procedure.
Procedural programming is used for developing simple applications. The languages that use the procedural programming methodology include Pascal and C languages.
Some of the benefits of the procedural programming methodology are:
Easy to read program code.
Easy maintainable program code as various procedures can be debugged in isolation.
Code is more flexible as you can change a specific procedure that gets implemented across the program.
The features of procedural programming methodology are:
Large programs are divided into smaller programs.
Most of the data is shared as global that can be accessed from anywhere within the program.
In the procedural programming approach, portions of the code are so interdependent that the code in one application cannot be reused in another. For example, the module used to calculate the salary of the employees in a bank management system cannot be used to calculate the salary of the employees in an educational institute. You need to create a separate module to calculate the salary of the employees in an educational institute.
When you need to reuse the procedural program in another application, a change in the application results in rewriting a large portion of the code. This results in decreased productivity and increased maintenance cost of the application. This was one of the reasons that led to the evolution of the object-oriented approach.
Published by Harsh Gupta - Tech Writer
I am a part time freelancer and writing is my hobby Some of my websites: http://www.GenericArticles.com http://www.JailBreakingiPhone.com View profile
- Acid Rain: What it Is, What it Does, and What Can Be Done About it Students will extend and expand their knowledge of the water cycle through an investigation of the effects of acid rain.
- Using DOS Commands with Windows XP Home, XP Professional and VistaFrom IT technicians and programmers to the casual user, it is beneficial to know how to use DOS commands in Windows. This article will show you how to use those commands, and show you which will work on which types of...
- Social Anxiety Disorder Creates Misery in Life of Adults and AdolescentsThis paper is designed to help the reader under the basics about Social Anxiety Disorder (SAD) and how children / adolescents and adults are affected too.
- Fear, Sex, and Identity in Herman Melville's Typee An exploration of the uncanny effects of cannibalism, sex, and tattoing upon postcolonialism generally, and Melville studies specifically.
- How to Use DOS and Common CommandsThere are many DOS (Disk Operating System) commands that can come in handy in various situations. It seems no one wishes to educate anyone in this day and age of technology. We have lost those roots but they are to no...
- News of the Past a Great Assignment for Computer Class and Fundraising
- Insider Track to Getting Your Job Done Right and on Time at FedEx Kinko's
- Archiving Genealogical and Family History Information the Beautiful Way
- Barnes and Noble Nook Review
- Computer Programming - Then and Now
- Product Review: Citizen Hyper Aqualand Promaster Diving Watch
- PERFECTION' is the Definition of the Nokia 6500 Slide and Classic
- In procedural programming, you can use a subprogram at multiple locations within a program to perfor
- Most of the data is shared as global that can be accessed from anywhere within the program.

