![]() In this case, the loop is executed at least once even if the condition is false because the condition is checked at the end of the loop after it is run once. These are –ī) at the end of the loop after it has run once. In a Do While loop the condition can be evaluated at two places. This means that the loop will continue execution till the condition is true and would stop only when the condition becomes false. Let’s see an example where the code finds out the sum of first 10 odd numbers.ĭo While Loop runs a set of statements while a condition is True. This can be done using the Step property. ![]() If you wish you can change the default value to any other value. In the above example you would have noticed that the counter, i, is incremented by a value 1. Lets see an example of for loop where the codes finds out the sum of numbers from 1 to 10. Let’s see each of these four loops one by one.įor Loop uses a counter to run a group of statements a specified number of times. VBScript provides you with the following four looping statements – The number of times the code is executed depends upon many factors such as some loops are executed until a condition is True or False while some other loops are executed a fixed number of times. Looping statements allow you to repeatedly execute a set of statements multiple times. ![]() In this fifth installment of QTP VBScript Tutorial series, we would cover the various looping statements that are available in VBScript. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |