Control Structure

Why Trust Techopedia

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

Margaret Rouse
Technology Expert
Margaret Rouse
Technology Expert

Margaret 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 IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.