Loop Encyclopedia Article

Loop

The following sections of this BookRags Literature Study Guide is offprint from Gale's For Students Series: Presenting Analysis, Context, and Criticism on Commonly Studied Works: Introduction, Author Biography, Plot Summary, Characters, Themes, Style, Historical Context, Critical Overview, Criticism and Critical Essays, Media Adaptations, Topics for Further Study, Compare & Contrast, What Do I Read Next?, For Further Study, and Sources.

(c)1998-2002; (c)2002 by Gale. Gale is an imprint of The Gale Group, Inc., a division of Thomson Learning, Inc. Gale and Design and Thomson Learning are trademarks used herein under license.

The following sections, if they exist, are offprint from Beacham's Encyclopedia of Popular Fiction: "Social Concerns", "Thematic Overview", "Techniques", "Literary Precedents", "Key Questions", "Related Titles", "Adaptations", "Related Web Sites". (c)1994-2005, by Walton Beacham.

The following sections, if they exist, are offprint from Beacham's Guide to Literature for Young Adults: "About the Author", "Overview", "Setting", "Literary Qualities", "Social Sensitivity", "Topics for Discussion", "Ideas for Reports and Papers". (c)1994-2005, by Walton Beacham.

All other sections in this Literature Study Guide are owned and copyrighted by BookRags, Inc.

Loop

The term loop applies to programming, which is the creation of software instruction for the performance of desired tasks. A loop is a series of instructions that is repeated until a certain condition results.

The programming code of loops has two variations, involving what is called the condition. The condition is a logical or mathematical equation that has a true or false outcome. The condition is used to define whether a loop is entered or exited. Typically, the true outcome will allow looping, and the false outcome will stop looping. For this to work, the condition must be capable of being changed from a true to a false outcome. One variation has the condition at the beginning of the loop's code. Here, the code between the start and the end of the loop is acted on only if the condition is met. The other code has the condition at the end of the code. Here, the function specified by the code is performed and then the loop condition is encountered, which can stop the loop.

A loop consists of many passes through the same set or series of instructions. Each pass is called an iteration. A loop allows the computer to execute the many iterations that can comprise the loop, rather than the programmer having to execute each iteration. The result is a great saving of the programmer's time and labor. Not surprisingly, loops have become one of the basic underpinnings of programming. Loops are part of all programming languages.