Structure:
do (while(expression) or until(expression))
.
.
.
loop (while(expression) or until(expression))
This is called a loop in VB and it is used to do something more than one times.
It may be used without any of the parameters "while" or "until" but in such case you have to make your code exit of the loop or most likely your program is going to stop responding.
The while parameter is used when we want the code in the loop to be executed WHILE the expression is True.
Example:
variable = variable + 1
The until parameter is used when we want the code in the loop to be executed until the expression gets True.
Example:
variable = variable + 1
Think about the differences in plain English. The do-while loop will keep executing while its condition is true. The do-until loop will keep executing until its condition is true.
VB does not determine that at all. Programmer can give loop break instructions. Break command will break loops programatically.
A Do-While loop looks like this: do { loop body } while (condition); and a While loop looks like this: while (condition) { loop body } The main difference is that the loop body is always run once in the Do-While loop, then the condition is checked to see if the loop should keep running. In a While loop, the condition is checked first, and it will not run the loop body at all if the condition is false.
A Loop is a programming language construct that instructs the processor to repeat a sequence of operations a number of times until a specific condition is reached. There are different types of loops. They are: * for loop * while loop * do while loop
We need a for loop because the while and do-while loops do not make use of a control variable. Although you can implement a counter inside a while or do-while loop, the use of a control variable is not as self-evident as it is in a for loop. Aside from the use of a control variable, a for loop is largely the same as a while loop. However, it is quite different to a do-while loop, which always executes at least one iteration of the loop before evaluating the conditional expression. In a for and while loop, the conditional expression is always evaluated before entering the loop, which may result in the loop not executing at all.
repeating the number of operation a fixed number of times is called determinant loop.........
it means malathi
Do while and Do until are interchangeable, and they take the opposite condition. Do While executed the body of the loop while (condition=true), and Do until executes body of loop until (condition=true). For example, if I was doing a Loop to say, while the check box is checked, display a message box (Never do this btw, it's just an example) I could either say Do While (MyCheckBox.Checked = True) Loop or Do Until (MyCheckBox.Checked <> True) Loop
VB does not determine that at all. Programmer can give loop break instructions. Break command will break loops programatically.
A nested loop is a (inner) loop that appears in the loop body of another (outer) loop. The inner or outer loop can be any type: while, do while, or for. For example, the inner loop can be a while loop while an outer loop can be a for loop.
They both loop
A do while loop executes when a condition is true.Ex.do while 1 = 1loopthis would execute forevera do until executes until the condition is met.Ex.do until 1 = 1loopThis would NOT execute. The program would see that 1 is in fact equal to 1 and does not perform the loopNote: "1=1" can be any conditional expression, not limited to what is shown
A Do-While loop looks like this: do { loop body } while (condition); and a While loop looks like this: while (condition) { loop body } The main difference is that the loop body is always run once in the Do-While loop, then the condition is checked to see if the loop should keep running. In a While loop, the condition is checked first, and it will not run the loop body at all if the condition is false.
Is loop
A Loop is a programming language construct that instructs the processor to repeat a sequence of operations a number of times until a specific condition is reached. There are different types of loops. They are: * for loop * while loop * do while loop
We need a for loop because the while and do-while loops do not make use of a control variable. Although you can implement a counter inside a while or do-while loop, the use of a control variable is not as self-evident as it is in a for loop. Aside from the use of a control variable, a for loop is largely the same as a while loop. However, it is quite different to a do-while loop, which always executes at least one iteration of the loop before evaluating the conditional expression. In a for and while loop, the conditional expression is always evaluated before entering the loop, which may result in the loop not executing at all.
There are 3 type of loop 1 is for loop 2 is loop while 3 is loop untile
repeating the number of operation a fixed number of times is called determinant loop.........