# Non-structured programming

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Non-structured_programming
> Markdown URL: https://mediated.wiki/source/Non-structured_programming.md
> Source: https://en.wikipedia.org/wiki/Non-structured_programming
> Source revision: 1310525870
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description |Programming paradigm preceding structured programming}}
{{More citations needed |date=April 2025}}
{{Use Oxford spelling |date=April 2025}}
{{Use dmy dates |date=April 2025}}
'''Non-structured programming''' (a.k.a. unstructured programming) is the [programming paradigm](/source/programming_paradigm) that describes the [state-of-the-art](/source/state-of-the-art) of programming before the [structured programming](/source/structured_programming) paradigm was envisioned and involves the use of the [goto](/source/goto) statement for [control flow](/source/control_flow) such as selection (i.e. [{{code |if/then/else}}](/source/Conditional_(computer_programming))) and iteration (i.e. [{{code |while}}](/source/While_loop) and [{{code |for}}](/source/For_loop)).

In general, the use of goto, particularly for selection and iteration, is criticized for producing unreadable, [spaghetti code](/source/spaghetti_code) in the 1968 open letter ''[Go To Statement Considered Harmful](/source/Go_To_Statement_Considered_Harmful)'' by Dutch computer scientist [Edsger W. Dijkstra](/source/Edsger_W._Dijkstra),{{sfnp |Dijkstra |1968 |p= }} who coined the term ''structured programming''.{{fact |date=April 2025}} 

Any [programming language](/source/programming_language) that provides goto can be used to write unstructured code. Notable languages that rely primarily if not exclusively on goto for control flow include [JOSS](/source/JOSS), [FOCAL](/source/FOCAL_(programming_language)), [TELCOMP](/source/TELCOMP), any [assembly language](/source/assembly_language), [batch file](/source/batch_file), and early versions of [BASIC](/source/BASIC), [Fortran](/source/Fortran), [COBOL](/source/COBOL), and [MUMPS](/source/MUMPS).

==References==
{{Reflist |20em}}

==Sources==
{{Refbegin |30em |indent=yes}}
*{{cite journal |last=Dijkstra |first=Edsger W. |author-link=Edsger Dijkstra |title=Letters to the editor: Go to statement considered harmful |date=March 1968 |doi=10.1145/362929.362947 |url=https://www.cs.utexas.edu/users/EWD/ewd02xx/EWD215.PDF |journal=[Communications of the ACM](/source/Communications_of_the_ACM) |volume=11 |issue=3 |pages=147–148 |s2cid=17469809 |quote=The unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress.  ... The go to statement as it stands is just too primitive, it is too much an invitation to make a mess of one's program. }}
{{Refend}}

== Further reading ==
{{Refbegin |30em |indent=yes}}
*{{cite journal|last=Cobb|first=Gary W.|year=1978|title=A measurement of structure for unstructured programming languages|journal=ACM SIGSOFT Software Engineering Notes|volume=3|issue=5|pages=140–147|issn=0163-5948|doi=10.1145/953579.811114|doi-access=free}}
{{Refend}}

==External links==
* [http://code.google.com/p/bpstruct/ BPStruct] - A tool to structure concurrent systems (programs, process models)

{{Programming paradigms navbox}}
{{Subject bar |auto=0 |b=Computer Programming/Control |portal1=Computer programming }}

Category:Programming paradigms

---
Adapted from the Wikipedia article [Non-structured programming](https://en.wikipedia.org/wiki/Non-structured_programming) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Non-structured_programming?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
