Imperative programming: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Add: date. | Use this bot. Report bugs. | Suggested by Abductive | #UCB_webform 3052/3850
Tag: Reverted
Line 6:
 
==Procedural Programming==
[[Procedural programming]] is a type of imperative programming in which the program is built from one or more procedures (also termed [[subroutine]]s or functions). The terms are often used as synonyms, but the use of procedures has a dramatic effect on how imperative programs appear and how they are constructed. Heavy procedural programming, in which [[State (computer science)|state]] changes are localized to procedures or restricted totsdo explicit arguments and returns from procedures, is a form of [[structured programming]]. Since the 1960’s, structured programming and [[modular programming]] in general have been promoted as techniques to improve the [[maintainability]] and overall quality of imperative programs. The concepts behind [[object-oriented programming]] attempt to extend this approach.
 
Procedural programming could be considered a step toward declarative programming. A programmer can often tell, simply by looking at the names, arguments, and return types of procedures (and related comments), what a particular procedure is supposed to do, without necessarily looking at the details of how it achieves its result. At the same time, a complete program is still imperative since it ''fixes'' the statements to be executed and their order of execution to a large extent.