News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

What is Loop?

Started by sukishan, Jul 11, 2009, 06:41 PM

Previous topic - Next topic

sukishan

What is a Loop?
A loop is something that goes round and round and round. If someone told you to move your finger around in a loop, you'd know what to do immediately. In programming, loops go round and round and round, too. In fact, they go round and round until you tell them to stop. You can programme without using loops. But it's an awful lot easier with them. Consider this.

You want to add up the numbers 1 to 4: 1 + 2 + 3 + 4. You could do it like this

Dim answer As Integer

answer = 1 + 2 + 3 + 4

MsgBox answer

Fairly simple, you think. And not much code, either. But what if you wanted to add up a thousand numbers? Are you really going to type them all out like that? It's an awful lot of typing. A loop would make life a lot simpler.

But don't get hung up too much on the name of the Loop. Just remember what they do: go round and round until you tell them to stop.
A good beginning makes a good ending

denniscrrom

A loop is a repetitive sequence activities included in a process. In addition, a loop is a series of command, will continue to repeat over and over again, until a condition is met. There are three types of loops are available: for loop, while loop and do - while loop.

yagnesh

 A loop is a series of commands that will continue to repeat over and over again untill a condition is met. For example, let's say you have the names of people in an array, and you wanted print a list of all of the names. You could setup a loop that would print the first persons name, and then move on to the next and print her name, etc (the continuing to repeat itself part.) The condition would be that it stops once all of the names have been used in mobile application.loop is important for repeating songs of media player in mobile phone.

davidscamron

Loop is used to repeat a task again and again. If you want to enter 100 and more value then this is very pathetic work to enter hundred values or print hundred values. To overcome this problem loop is used. There are three types of loops in any language
1.while
2. Do while
3. For

mikerock

In programming language Loop is sequence of instruction which is continuously repeated until a certain condition is matched. If Loop has not the next instruction in the sequence then Loop return the first instruction in the sequence and repeat the sequence.  If the condition has been reached, the next instruction "falls through" to the next sequential instruction or branches outside the loop.

lekha gadhvi

loop means repeating a sequance of code either restricted times or restricted criteria