Procedural programming can sometimes be used as a synonym for very important programming (specifying the steps the program have to take to reach the desired state), however can as well refer (as in this article) to a programming paradigm based upon the thought of the procedure call. Procedures, as well known as routines, subroutines, methods, or functions (not to be confused with mathematical functions, but like those used in functional programming) simply include a series of computational steps to be carried out. Any given procedure may be called at any point during a program's execution, including by other procedures or by itself.
Procedural programming is sometime a better option than simple sequential or unstructured programming in many situations which involve moderate complexity or which need important ease of maintainability.
Possible benefits:
* The ability to use again the same code at different places in the program without copying it.
* An easier method to keep track of program flow than a collection of "GOTO" or "JUMP" statements (which can turn a large, complex program into spaghetti code).
* The capability to be strongly modular or structured.
No comments:
Post a Comment