![]() 1,083,846,704 visitors served. |
|
![]() Dictionary/ thesaurus | ![]() Medical dictionary | ![]() Legal dictionary | ![]() Financial dictionary | ![]() Acronyms | ![]() Idioms | ![]() Encyclopedia | ![]() Wikipedia encyclopedia | ? |
loop |
Also found in: Dictionary/thesaurus, Medical, Idioms, Wikipedia | 0.20 sec. |
|
In programming, a repetition within a program. Whenever a process must be repeated, a loop is set up to handle it. A program has a main loop and a series of minor loops, which are nested within the main loop. Learning how to set up loops is what programming technique is all about. Loops are accomplished by various programming structures that have a beginning, body and end. The beginning generally tests the condition that keeps the loop going. The body comprises the repeating statements, and the end is a GOTO that points back to the beginning. In assembly language, the programmer writes the GOTO, as in the following example that counts to 10.
MOVE "0" TO COUNTER
LOOP ADD "1" TO COUNTER
COMPARE COUNTER TO "10"
GOTO LOOP IF UNEQUAL
STOP
In high-level languages, the GOTO is generated by the interpreter or compiler; for example, the same routine as above using a WHILE loop.
COUNTER = 0
DO WHILE COUNTER <> 10
COUNTER = COUNTER + 1
ENDDO
STOP
For a more detailed look at a loop, look at the end of the C definition. The main event loop of the DOS version of this database is presented.
How to thank TFD for its existence? Tell a friend about us, add a link to this page, add the site to iGoogle, or visit webmaster's page for free fun content. |
|
? Mentioned in |
|---|
| Free Tools: |
For surfers:
Browser extension |
Word of the Day |
Help
For webmasters: Free content | Linking | Lookup box | Double-click lookup | Partner with us |
|
|---|