Procedural programming is a programming paradigm built around the idea that programs are sequences of instructions to be executed. They focus heavily on splitting up programs into named sets of instructions called procedures, analogous to functions. A procedure can store local data that is not accessible from outside the procedure's scope and can also access and modify global data variables.
What are some tenets of procedural programming?
- Programs are composed of sequences of instructions. Minimal abstraction is present between the code and the machine.
- Procedures, which are logical blocks consisting of groups of instructions, can be invoked from other places in the code.
- A procedure can accept arguments and return values to the caller. Additionally, functions can access and modify variables in the global scope.
- Procedural languages follow structured programming practices and use block-based control flow rather than goto commands.