Quality Testing

Quality is delighting customers

In a 'for' loop how to skip the current iteration and continue with the next iteration????

Views: 71

Reply to This

Replies to This Discussion

Look into the folowing for loop:

For i = 1 to 10
if (i = 5) Then
i = i+1
i = i-1
else

msgbox i
End If

Next
You can skip the present iteration in a For Next loop by using Contionue statement wherever u wish it should skip the iteration .......For exampel in a For Next loop you cancheck using a conditional statement

if (i==9)
{ continue; }

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service