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.

Advertisements

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.

Advertisements

Related Terms

Latest Computer Science Terms

Related Reading

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…