This section contains 252 words (approx. 1 page at 300 words per page) |
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.
This section contains 252 words (approx. 1 page at 300 words per page) |