Procedural programming is a programming paradigm that can be developed by the computer programs. The name is not unique; in the literature, it is used for different meanings:
- As an extension of the imperative paradigm for the approach to decompose algorithms into manageable parts that can be called using a defined interface.
- Within the imperative paradigm as a counterpart to object-oriented programming
Decomposition into sub-problems
The procedural programming complements the imperative concept of successive commands to adjust the approach to decompose an algorithm into manageable parts. Depending on programming these parts subprogram, subroutine, procedure, or function are called. It is possible to pass parameters and return results. Through local and global variables, the "visibility" of the variables can be controlled: While local variables are known only within a procedure, global variables throughout the computer program are known. Together with the control structures of the structured programming is the procedural programming means for the production of clarity. In addition to the clarity so code duplication can be avoided. The modular programming has a similar purpose, but at a higher level: larger computer programs are developed in this individual modules compiled separately and can be tested or completed program libraries should be included.
For example, Fortran possessed in the first version ( 1960 ) does not have the procedural approach in spite of other concepts to structured programming; the procedural approach has been incorporated in a later version.
Imperatives, non-object- oriented programming
The second meaning is a collective term for the type of programming that have long prevailed until the 1990s, to object-oriented programming was introduced as practicable development. Synonym is also spoken of the "classical" or " traditional programming".
Concepts of procedural programming are the basis for the object-oriented programming. Since then, the procedural programming and object-oriented programming are considered to be two main tendencies within the imperative programming. Hybrid languages support both concepts.
The procedural nature of the development was - caused earlier by the programming language support - the classic way of programming. However, determining properties of procedural development are still partially applicable in newer programming languages.
Characteristics of this type of programming are:
- Imperative approach: sequence of defined state transitions, which is defined as those states are to be changed. This Composite instructions can finally ( program ends terminated independently) or even be infinite ( program waits for events ).
- Control structures ( eg, sequence, loop, branch ) to control the command execution.
- Calling subroutines and passing and returning parameter values (the concept of abstraction and procedural programming in the strict sense ). This creates a hierarchy of functions, each of which is processed sequentially. The grouping and hierarchy may correspond to any logical principles. The starting point of the program is the main procedure - be called from the sub-functions.
- Data values are defined as named variables and referenced by their name.
- These variables are associated with data types, each allowing only certain instructions.
The main difference between procedural and object -oriented programming is the relationship between data and functions. While, together with the object -oriented programming, data and functions that can be applied to these data objects, data, and features have no cohesion in procedural programming.
The development of procedural programming languages and techniques based on the von Neumann architecture, which began with the assembly languages and high level languages found their further development. While the procedural approach follows the program flow on the hardware abstraction of the object-oriented approach. Thus, the procedural programming is regarded as a level of abstraction between assembly language and object-oriented programming