Three Basic Structures Of Structured Programming

  • Length: 1073 words (3.1 double-spaced pages)
  • Rating: Excellent
Open Document

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Text Preview

More ↓

Continue reading...

Open Document

Structured programming is one of the several different ways in which a programming language can be constructed. "It was originally introduced as a means of getting away from the 'spaghetti' code that was used in the early days and to provide some means by which programmers could more easily follow code written by other programmers." (Hendren, 1998) Structured programming is a procedure-oriented method of designing and coding a program.
At a low level, structured programs are composed of simple, hierarchical program flow structures. "These are regarded as single statements, and are the same time ways of combining simpler statements, which may be one of these structures, or primitive statements such as assignments or procedure calls." (Dijkstra, 1990) The three basic types of structure identified by Dijkstra were concatenation, selection, and repetition.

Simple sequential code is most easily expressed by concatenation i.e. listing the pieces of code in the correct order. The main related question is how to indicate the boundary between statements. "Some languages just use the end of line but then usually require an explicit continuation symbol for statements too long to fit on a single line. Others languages use an explicit character such as, with some of these treating it as a separator and the rest treating it as the statement terminator." (Birrell, 1995)
To turn a code sequence into a single entity, usually known as a compound statement, some languages use an explicit pair of brackets, such as {} or begin end, as a general form useable with any structure. Some languages have specific forms for each structure, such as if fi (or if end if) and while od (or while end while). Some languages have both general and specific forms, and others have neither. Because structures often end up deeply nested, specific keywords can be much easier to pair up than general pairs.
"The classic selector is the conditional or if statement/expression, and almost all languages have it, usually in two slightly different forms such as if then and if then else." (Agresti, 2000) Some languages place restrictions on the then and else parts, but most modern languages have no such restrictions, allowing nested if statements.
One common pattern of use is:
If ... then...
Else if ... then...
Else if .

Need Writing Help?

Get feedback on grammar, clarity, concision and logic instantly.

Check your paper »

How to Cite this Page

MLA Citation:
"Three Basic Structures Of Structured Programming." 20 Jun 2018
Title Length Color Rating  
Social Structures Essay - In the late 1730s two apprentices tortured and killed many cats as a joke and act of rebellion against their master. This event may seem revolting to a modern audience but it was a joke to the apprentices who were killing these cats (Darton, "Workers Revolt: The Great Cat Massacre of the Rue Sait-Severin, pp75-104). To understand the joke there are many ways of analyzing the historical context within which this event took place. Two anthropological theories used to analyze this event are the social structural theory, according to A.R....   [tags: Society, Theoriies, Structures] 2256 words
(6.4 pages)
Powerful Essays [preview]
Different Types of Structures within an Organization Essay - What is Organization Structure. Company Profile’s: The Post Publishing Public Company Limited is the publisher and distributor of the Bangkok Post – an Engli shlanguage newspaper, Post Today – a Thai-language business daily, Student Weekly – an English-language magazine for high school pupils, university students and other readers, and M2F – a newly established free Thai language newspaper for circulation directly to young professionals working in Bangkok. The Company’s book publishing arm, Post Books, publishes best-selling international titles translated into Thai as well as books authored by our newspaper reporters and columnists and other well-known Thai authors, in addition to special...   [tags: mechanistic structure, organic structure]
:: 3 Works Cited
1686 words
(4.8 pages)
Powerful Essays [preview]
Organizational Structures Essay - Introduction McShane and Von Glinow state that “the best organizational structure depends on the organization’s external environment, size, technology, and strategy” (409). To identify the best organizational structure for Protegé Engineering, I will first determine what ‘Organizational Structure’ means. In a second step I will analyze its elements and carve out the important components for the considered organization. Finally I will provide a conclusion and recommendation. Organizational Structures In general, organizational structure is related to the way that an organization organizes employees and jobs, so that its work can be performed and its goals can be met....   [tags: Organizational Development, McShane, Von Glinow] 2179 words
(6.2 pages)
Strong Essays [preview]
Theme Writing in a Five Paragraph Structured Form Essays - Theme Writing in a Five Paragraph Structured Form I'll just run off five quick paragraphs with a couple big words and a solid structure and I'll breeze through another paper. Let the nonsense begin. I never really liked my parents. I found out in high school that if you disagree with anyone, expect detention. Now I found myself in a new setting. I was surrounded by people yearning to write, straining to listen, dying to learn. I was in expository writing 220. I looked around and noticed that everyone seemed to be sitting in the proper first day arrangement, guys on one side, girls on the other....   [tags: Writing Education Teaching Essays] 1369 words
(3.9 pages)
Strong Essays [preview]
Business Structures Essay - Organizational roles and structures are important for hotels and lodges to function efficiently. “The purpose of these structures is to coordinate, communicate, and control individual actions to support the strategy, and to facilitate workflow, permit management control, and create doable jobs” (Enz, 2010). There are many dimensions of organizational structures from hierarchy of authority, degree of centralization, complexity, specialization, formalization and professionalism that needs to be decided upon of being necessary for organizations to operate at best performance....   [tags: Business Management ]
:: 2 Works Cited
1046 words
(3 pages)
Strong Essays [preview]
Governmental Structures Essay - As I began to create my ideal world, I realized that what I wanted was a mix of three different governments/cultures. I wanted (and still do) a government truly of and for the people. I also wanted a government that was minimalist, one that made sure there was some kind of order and peace, but one that was well, personal, while not interfering too much with the rights of it's citizens. Additionally, I wanted a government that would allow private industry, small businesses, and limited corporations....   [tags: essays research papers] 1352 words
(3.9 pages)
Strong Essays [preview]
Organizational Structures Essay - Introduction The design of a company affects every aspect of the business such as the way its members communicate, how decisions are made, and how the work is delegated, etcetera (, 2006). This layout is known as the organization structure formally defined by Wikipedia (2006) as, "the way in which the interrelated groups of an organization are constructed. From a managerial point of view the main concerns are ensuring effective communication and coordination." In respects to project management there are three primary organizational break downs they are functional structure, pure project structure, and matrix structure....   [tags: Business Organization Management]
:: 4 Works Cited
801 words
(2.3 pages)
Better Essays [preview]
Organization Structures Essay - Organization Structures The mechanistic view of an organization began with the industrial revolution. The view is a reflection of society's radical change from a rural agricultural base to one more impersonally based on centralized urban industry employing great numbers of people. The first changes began in the late 1600's and early 1700's with rudimentary machines replacing manual labor or accomplishing things not previously possible because of size, weight, or sheer numbers. The greatest industrial growth was during the 1800's period, which was exponential at its end and the outset of our century....   [tags: Organizations Mechanistic Organic] 1477 words
(4.2 pages)
Powerful Essays [preview]
Market Structures Essay - Market Structures McConnell and Brue (2004) describe four market structures that companies align themselves with during the course of their corporate lives. This paper will give examples of the four market structures: Pure Competition, Pure Monopoly, Monopolistic Competition and Oligopoly. Companies may move from market structure to market structure over the course of growth and time. This movement between structures may be the result of product changes, introduction of competition or consumer interests....   [tags: Business Marketing] 1986 words
(5.7 pages)
Strong Essays [preview]
Essay Bridge Structures - Bridge Structures and The Use of Geometry in Their Design What is a bridge. A bridge is a structure providing continuous passage over a body of water, roadway, or valley. Every bridge looks different from the another. Their bridge structure is different. There are nine types of main bridges. Bridge engineers use a lot of geometry to help them design the different bridges. Without geometry, the bridges would not be safe. Bridges have been around for a long time. The earliest bridges were probably formed by laying one or more logs across a brook or by stretching ropes or cables across a narrow valley....   [tags: essays research papers] 503 words
(1.4 pages)
Good Essays [preview]

Related Searches

.. then...
. . .
else ...
And this has given rise to a different kind of selection construct, the case or switch. This first arose as a modified goto:
goto label_array[n]
But this was even more dangerous than normal gotos, and was also replaced. A switch construct is essentially a list of (value, action) pairs. We can generalize the switch into a block of guarded statements, where at most one of the statements is obeyed e.g.:
I < j then j -= I
j < I then I -= j
We can even allow for more than one of the guard expressions being valid, either by picking the first such in the list, or by non-deterministically picking a valid guard at random.
"Repetition comes in two forms: recursion and loops. Some languages have both; some only have one or the other. Loops come in two forms: indeterminate, where the number of repetitions is unknown until the loop terminates, and determinate, where the number of repetitions is known when the loop starts. Again, some languages with iteration have both forms, some only one and the other." (Jackson, 2002)
Dijkstra's (indeterminate) repetition construct, which involves a test in the middle of the loop, is not often directly implemented in programming languages. However, special cases of it are common: a version with the first box missing so the test is at the start is found in most languages, and a version with the last box missing so the test is at the end is often found as well.
"Almost all languages provide some sort of determinate loop, usually known as a for-loop or do-loop. The basic form is a loop that e.g. counts from 1 to 10, and some languages provide little more than this: e.g.: for I = 1 to 10 do." (Fream, 1992)
Because of this some languages do not bother to test the condition until the end of each repetition. Various enhancements exist: variables or expressions for start and stop values, increments other than 1, decrements, automatic declaration of the counter variable, scalar types other than integer.
Some languages guarantee a particular value of the counter outside the loop or permit it to be modified inside the loop, whereas others do not, so as to allow for optimizations and because modifying the counter does not lead to good quality code.
We can transform the while statement into a loop containing a list of guarded statements, that repeats until none of the guards is valid e.g.:
I < j do j -= I
J < I do I -= j
This example terminates when I equals j.

Coders should break larger pieces of code into shorter subroutines (functions, procedures. methods, blocks, or otherwise) that are small enough to be understood easily. In general, programs should use global variables sparingly; instead, subroutines should use local variables and take arguments by either value or reference. These techniques help to make isolated small pieces of code easier to understand without having to understand the whole program at once.

Erosa, Hendren: (1998) Structured Programming, Language Design, and Persistence.

E.W. Dijkstra: (1990) Structured Programming: Three Basic Structures of Structured Programming, Academic Press, London.

Andrew D. Birrell: (1995) Programming with Threads, Research Report 35, Systems Research Center, Digital Equipment Corporation.

William Agresti: (2000) Three Basic Structures of Structured Programming, Journal of Programming.

M.A. Jackson: (2002) Basic controls and structures of Structured Programming, Journal of software development.

Skinner Fream: (1992) Structured Programming, program flow structures, Yale University press

Return to