Don't miss an insight. Subscribe to Techopedia for free.


Control Structure

What Does Control Structure Mean?

A control structure is a codebase portion that supports decisions based on analysis of variables. These functional components are eminently useful in computer science and computer programming.


Techopedia Explains Control Structure

One of the best ways to illustrate what a control structure is involves providing concrete examples. For example, a do-while loop illustrates a control structure, where the programmer instructs the loop to iterate some process for a given number of instances. The variable is set at a certain point, and set to increase on each iteration, until, when it hits a given threshold, the loop is complete and it stops.

An if/then statement is another example of a control structure. Applied to a variable in a given state, the if/then statement directs the computer’s corresponding activity.

Generally, control structures represent functional pieces of a codebase and show the role of these decision-making processes in code.


Related Terms