|
|
|
|
skip an iteration in a loop without using if condition...
|
|
10-12-2011, 03:31 PM
Post: #1
|
|||
|
|||
|
Dear friends, Recently i had attend an interview and the interviewer ask me a question, How will you skip a particular iteration from a loop in vb script without using the If condition checking inside the loop. i have no answer for this question and still searching for it.. is there anyone know..pls share it.. Thanks, Shibin P |
|||
|
10-12-2011, 04:49 PM
Post: #2
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
Shibin, Please don't create duplicate threads. We have deleted the other one.
As far as the answer is concerned (unless this is a trick question), one of the methods can be by putting this for loop in a function and making the lower and upper index as variables. So you can have something like PHP Code: Function loop_iteration(lower,upper)Others - please contribute your solutions as well. QTP Articles | QTP Training | QTP Jobs |
|||
|
10-12-2011, 04:55 PM
Post: #3
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
Thanks for the reply... i hope this is something like writing a loop for 2 times by avoiding the iteration which is not required.. m not sure whether my interviewer want the same...
thanks again... (10-12-2011 04:49 PM)Ankur Wrote: Shibin, Please don't create duplicate threads. We have deleted the other one. |
|||
|
10-13-2011, 12:46 PM
Post: #4
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
Any new reply?????
|
|||
|
10-13-2011, 08:50 PM
(This post was last modified: 10-13-2011 08:53 PM by vIns.)
Post: #5
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
Sorry if my reply is so stupid....
if the requirement is not to use 'IF' and 2 for loops... i will do something like this Code: For iterationNo =1 to 100~vIns~ |
|||
|
10-13-2011, 09:49 PM
Post: #6
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
Dear friend ,
Many thanks for your reply... i m not sure but most probably u may be correct, because may be my interviewer was checking my outbox thinking/analytical skill... thank you so much... (10-13-2011 08:50 PM)vIns Wrote: Sorry if my reply is so stupid.... |
|||
|
12-13-2011, 10:32 AM
Post: #7
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
how to make maximum number and minimum number function in QTP
|
|||
|
12-13-2011, 04:31 PM
Post: #8
|
|||
|
|||
|
RE: skip an iteration in a loop without using if condition...
ExitActionIteration
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
|
|

Search
Member List
Calendar
Help




