Structured programming

Graphical representation of the three basic patterns — sequence, selection, and repetition — using NS diagrams (blue) and flow charts (green).

Programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of the structured control flow constructs of selection and repetition (while and for), block structures, and subroutines.

- Structured programming

156 related topics

Relevance

Conditional (computer programming)

In computer science, conditionals (that is, conditional statements, conditional expressions and conditional constructs,) are programming language commands for handling decisions.

If-Then-Else flow diagram
A nested "If–Then–Else" flow diagram

As a result, structured programming, which allows (virtually) arbitrary statements to be put in statement blocks inside an statement, gained in popularity, until it became the norm even in most BASIC programming circles.

Pascal (programming language)

Pascal is an imperative and procedural programming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring.

Block (programming)

Lexical structure of source code which is grouped together.

Ada Lovelace, whose notes added to the end of Luigi Menabrea's paper included the first algorithm designed for processing by an Analytical Engine. She is often recognized as history's first computer programmer.

Blocks are fundamental to structured programming, where control structures are formed from blocks.

PL/I

Procedural, imperative computer programming language developed and published by IBM.

Computer memory map

It supports recursion, structured programming, linked data structure handling, fixed-point, floating-point, complex, character string handling, and bit string handling.

Ada (programming language)

Augusta Ada King, Countess of Lovelace.

Ada is a structured, statically typed, imperative, and object-oriented high-level programming language, extended from Pascal and other languages.

Python (programming language)

High-level, interpreted, general-purpose programming language.

The designer of Python, Guido van Rossum, at OSCON 2006
The standard type hierarchy in Python 3
Python Powered

It supports multiple programming paradigms, including structured (particularly procedural), object-oriented and functional programming.

Edsger W. Dijkstra

Dutch computer scientist, programmer, software engineer, systems scientist, science essayist, and pioneer in computing science.

Dijkstra in 2002
The Eindhoven University of Technology, located in Eindhoven in the south of the Netherlands, where Dijkstra was a professor of mathematics from 1962 to 1984.
The University of Texas at Austin, where Dijkstra held the Schlumberger Centennial Chair in Computer Sciences from 1984 until 1999.
Dijkstra's algorithm. It picks the unvisited vertex with the lowest-distance, calculates the distance through it to each unvisited neighbor, and updates the neighbor's distance if smaller. Mark visited (set to red) when done with neighbors.
ALGOL 60 was created as the result of the January 1960 ALGOL conference in Paris. By August 1960, Dijkstra and his colleague Jaap Zonneveld put into operation the first complete working ALGOL 60 compiler (for the Electrologica X1 computer) in the world. The Dijkstra–Zonneveld compiler predates the second ALGOL 60 compiler (by another group) by more than a year.
A semaphore (seinpaal), the term used in Dijkstra's original paper. In the early 1960s Dijkstra proposed the first synchronisation mechanism for concurrent processes, the semaphore with its two operations, P and V.
A simple example of two processes modifying a linked list at the same time causing a conflict. The requirement of mutual exclusion was first identified and solved by Dijkstra in his seminal 1965 paper titled Solution of a problem in concurrent programming control, and is credited as the first topic in the study of concurrent algorithms.
Illustration of the dining philosophers problem
Dijkstra at the blackboard during a conference at ETH Zurich in 1994. He once remarked, "A picture may be worth a thousand words, a formula is worth a thousand pictures."

He coined the phrase "structured programming" and during the 1970s this became the new programming orthodoxy.

Programming paradigm

Programming paradigms are a way to classify programming languages based on their features.

Overview of the various programming paradigms according to Peter Van Roy

For instance, pure functional programming disallows use of side-effects, while structured programming disallows use of the goto statement.

C (programming language)

General-purpose computer programming language.

Dennis Ritchie (right), the inventor of the C programming language, with Ken Thompson
The cover of the book The C Programming Language, first edition, by Brian Kernighan and Dennis Ritchie
"Hello, World!" program by Brian Kernighan (1978)
The C Programming Language
The TIOBE index graph, showing a comparison of the popularity of various programming languages

C is an imperative procedural language supporting structured programming, lexical variable scope, and recursion, with a static type system.

Goto

Statement found in many computer programming languages.

"GOTO" key on the 1982 Sinclair ZX Spectrum home computer, implemented with native BASIC (one-key command entry).

The 1970s and 1980s saw a decline in the use of GOTO statements in favor of the "structured programming" paradigm, with goto criticized as leading to "unmaintainable spaghetti code" (see below).