World Library  
Flag as Inappropriate
Email this Article

Non-structured programming

Article Id: WHEBN0020102710
Reproduction Date:

Title: Non-structured programming  
Author: World Heritage Encyclopedia
Language: English
Subject: Functional logic programming, Agent-oriented programming, Action language, Abductive logic programming, Attribute-oriented programming
Publisher: World Heritage Encyclopedia

Non-structured programming

Non-structured programming is the historically earliest programming paradigm capable of creating Turing-complete algorithms. It has been followed historically by procedural programming and then object-oriented programming, both of them considered as structured 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 had been praised for the freedom it offers to programmers and has been compared to how Mozart wrote music.[1]

There are both high- and low-level programming languages that use non-structured programming. These include early versions of BASIC (such as MSX BASIC and GW-BASIC), JOSS, FOCAL, MUMPS, TELCOMP, COBOL, machine-level code, early assembler systems (without procedural metaoperators), assembler debuggers and some scripting languages such as MS-DOS batch file language.

Features and typical concepts

Basic concepts

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.

There is no concept of local variables in non-structured programming (although for assembly programs, general purpose registers may serve the same purpose after saving on entry), but labels and variables can have a limited area of effect (For example, a group of lines). This means there is no (automatic) context refresh when calling a subroutine, so all variables might retain their values from the previous call. This makes general recursion difficult, but some cases of recursion--where no subroutine state values are needed after the recursive call--are possible if variables dedicated to the recursive subroutine are explicitly cleared (or re-initialized to their original value) on entry to the subroutine. The depth of nesting also may be limited to one or two levels.

Data types

Non-structured languages allow only basic data types, such as numbers, strings and arrays (numbered sets of variables of the same type). The introduction of arrays into non-structured languages was a notable step forward, making stream data processing possible despite the lack of structured data types.


  1. ^ William W. Cobern. A positive albeit ambiguous case for BASIC programming in secondary science teaching.

Further reading

  • Cobb, Gary W. (1978). "A measurement of structure for unstructured programming languages".  

External links

  • BPStruct - A tool to structure concurrent systems (programs, process models)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.