← New search

Other meanings of Structured programming

Programming paradigms

Structured programming

Structured programming is a programming paradigm emphasizing clear control flow and block structures. It organizes computation around sequence, selection, and iteration rather than unrestricted jumps, making programs easier to read, test, modify, and reason about.1

3
core control forms
sequence, selection, iteration
1966
formal foundation
Böhm–Jacopini theorem
1
main design aim
local, understandable control flow
1

Definition and core constructs

Structured programming expresses a program as nested blocks with explicit, limited control flow. Its three fundamental forms are sequence, selection, and iteration: statements execute in order, conditional constructs choose among alternatives, and loops repeat a block while a condition holds.2

Typical syntax includes if/else, while, for, and procedure or function calls. A block gives related statements a visible boundary and a local context. This organization does not require every program to be short or simple; it instead makes each control path more apparent. Subroutines further divide a large task into units that can be specified, tested, and reused independently. The approach is distinct from a particular language: it can be practiced in C, Pascal, Ada, Java, and many other languages, although language features differ.

2

Origins and theoretical basis

The paradigm emerged from concerns that unrestricted jumps made large programs difficult to understand and verify. In his influential 1968 letter, Dijkstra argued that the goto statement often obscured a program’s logical structure and advocated disciplined alternatives.1

The mathematical foundation was supplied by the Böhm–Jacopini theorem, published in 1966. It showed that every computable function expressible by a flowchart can be represented using sequence, selection, and iteration, with auxiliary variables when necessary.2 The theorem established expressive sufficiency, not that all such rewritings are elegant or efficient. Earlier language design also mattered: the ALGOL 60 report helped normalize block structure, lexical scope, nested procedures, and readable control constructs in mainstream programming notation.3

3

Practice, benefits, and limits

Structured programming improves reasoning by making a procedure’s entry, exit, and nesting relationships visible. A programmer can inspect a loop invariant, trace a conditional branch, or test a subroutine without following arbitrary transfers across the entire program. These properties support modular design, code review, debugging, and formal verification; Hoare’s work connected structured commands with assertions about what is true before and after execution.5

The method is not a guarantee of quality. Deeply nested conditionals, complicated loop conditions, excessive shared state, or poorly chosen abstractions can produce difficult code while obeying structured syntax. Modern practice therefore combines structured control flow with data abstraction, interfaces, exceptions, concurrency mechanisms, and automated tests. Some languages retain controlled forms of early exit, such as break or return; these can be readable when their scope and purpose are local, even though they do not fit the original three-form ideal exactly.

4

Lesser-known aspects

Structured programming is broader than simply banning goto. Its deeper concern is the disciplined arrangement of control and data so that a programmer can understand a component from its local structure. A single exit from every routine was once promoted as a rule, but later practice treated multiple returns as a judgment call when they clarify exceptional or guard conditions.

The paradigm also influenced safety-critical and high-assurance development. Languages such as Ada provide explicit block constructs, strong modularity, and control-flow features suited to programs where review and predictable behavior matter.4 In some embedded or systems code, a restricted jump may still be accepted for finite-state machines, error cleanup, or generated code when its behavior is easier to audit than a heavily nested alternative. Thus structured programming is best understood as a design discipline: control transfers should be few, visible, justified, and organized around comprehensible program units.

Glossary

Sequence
Execution of statements in the order in which they appear.
Selection
A conditional construct that chooses one of several paths, such as if/else or switch.
Iteration
Repeated execution of a block controlled by a loop condition or traversal rule.
Block
A syntactically delimited group of statements that forms a structural and often lexical unit.
Control flow
The order in which operations, statements, and routines are executed.
Loop invariant
A property that remains true at designated points during every iteration of a loop.

The three-form model describes control-flow structure; it does not prescribe a single programming language, development process, or software architecture.