2023-01-23

Procedural Programming

What is Procedural Programming

Procedural Programming is a programming paradigm, centered around the concept of procedure calls. Procedures, also known as routines, subroutines, or functions, are a set of computational steps to be carried out. Any given procedure might be called at any point during a program's execution, including by other procedures or itself.

Key Concepts in Procedural Programming

  • Variables and Data Types
    In procedural programming, variables are utilized to store information. These variables are associated with data types, determining the kind of value a variable can hold, such as integers, floats, characters, or boolean values. Understanding how to declare and use variables is crucial to managing data within a procedural program.

  • Functions and Procedures
    The heart of procedural programming lies in the use of procedures or functions. These encapsulate a sequence of instructions into a single program unit. Functions might accept inputs, known as parameters, and return a single output. They provide a way to structure a program and reuse code.

  • Control Structures: Sequence, Selection, and Iteration
    Control structures guide the order of execution of the instructions in a program. Sequence is the default control structure; instructions are executed one after another. Selection is used for decisions, branching, and jumping in the program flow. Iteration allows a set of instructions to be repeated a number of times.

  • Scope and Lifetime of Variables
    The scope of a variable refers to the part of the program where the variable can be accessed, while the lifetime of a variable is the period during which the variable exists in memory during program execution. These concepts are pivotal in managing data within and across functions.

  • Exception Handling
    Exception handling in procedural programming is the process of responding to anomalous or exceptional conditions requiring special processing, often changing the normal flow of program execution. It's a crucial part of designing robust and resilient programs.

Procedural Programming Languages

  • C
    The C programming language, developed in the early 1970s, is a widely used procedural language known for its efficiency and control. It has been instrumental in the development of a variety of system software, including operating systems, as well as applications.

  • Fortran
    Fortran is a procedural programming language that's particularly suitable for numeric computation and scientific computing. Developed in the 1950s at IBM, Fortran continues to be used in areas like finite element analysis, numerical weather prediction, and computational physics.

Ryusei Kakujo

researchgatelinkedingithub

Focusing on data science for mobility

Bench Press 100kg!