*** Welcome to piglix ***

Unstructured programming


Non-structured programming is the historically earliest programming paradigm capable of creating Turing-complete algorithms. It is often contrasted with structured programming paradigms, including procedural, functional, and object-oriented programming.

Unstructured programming has been heavily criticized for producing hardly-readable ("spaghetti") code and is sometimes considered a bad approach for creating major projects, but has been praised for the freedom it offers to programmers and has been compared to how Mozart wrote music.

There are both high- and low-level programming languages that use non-structured programming. Some languages commonly cited as being non-structured include JOSS, FOCAL, TELCOMP, assembly languages, MS-DOS batch files, and early versions of BASIC, Fortran, COBOL, and MUMPS.

A program in a non-structured language usually consists of sequentially ordered commands, or statements, usually one in each line. The lines are usually numbered or may have labels: this allows the flow of execution to jump to any line in the program.

Non-structured programming introduces basic control flow concepts such as loops, branches and jumps. Although there is no concept of procedures in the non-structured paradigm, subroutines are allowed. Unlike a procedure, a subroutine may have several entry and exit points, and a direct jump into or out of subroutine is (theoretically) allowed. This flexibility allows realization of coroutines.


...
Wikipedia

...