At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.
In the world of computer programming, structured programming is a logical construct that allows for the efficient operation of a program. With this in mind, many programmers understand it as being one of the disciplines that make up the overall process of procedural programming. One of the advantages to the implementation of a structured model of programming is the ability to either eliminate — or at least reduce — the necessity of employing the GOTO statement.
The essential composition of any type of structured programming tends to include three basic elements: concatenation, selection, and repetition. Concatenation has to do with the logical sequence of the statements that make up the basics for the order to be executed. Each step in the sequence must logically progress to the following step without invoking any undesirable activities.
Selection step allows for the selection of any one of a number of statements to execute, based on the current status of the program. Generally, the selection statements will contain keywords that help to identify the order as a logical executable, such as “if,” “then,” “endif,” or “switch.”
A third component is repetition. Within this element, a selected statement remains active until the program reaches a point where there is a need for some other action to take place. A repetition normally will include keywords such as ”repeat,” “for,” or “do ... until.” Essentially, the repetition instructs the program how long to continue the function before requesting further instructions.
The exact nature of structured programming will vary, depending on the purpose and function of the program. Most forms will begin with a single point of entry, but may allow for more than one point of exit. Some types, sometimes called modular programming, will allow for the creation of subsets or modules within the overall structure of the program that interact with one another, based on the type of order that is executed.