@ksheka : Oops, yupps .... i mean to say i was expecting 2,3,4 but
output was 2,3,4,5.

@Srinivas : I'm not trying to achieve anything. I just found out this
peculiar behaviour of FOR loop in VbScript where instead of iterator
if you change the target value of iterator, FOR Loop in vbscripting is
not obliging that and reaching till the end which was the initial
target value.

Just wanted some views of fellow members and if i'm the one who is
still unknown of this fact then maybe thinking abt going back to help
files to learn more :D

Cheers.. :)

On May 3, 12:43 pm, Srinivas Pavuluru <[email protected]> wrote:
> Not sure what you want to achieve, can you please more clear on this.
>
> On 5/3/12, iRahulSingh <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hello Frnds ...
>
> > Look into the following code :
> > p = 5
> > For i = 2 To p
> >    MsgBox i
> >    If i = 3 Then
> >            p = 4
> >    End If
> > Next
>
> > initially I thought output of this would be 1,2,3,4 BUT the OUTPUT is
> > 1,2,3,4,5 !!
>
> > Interesting... haven't checked the for loop help yet for vbscript but
> > doesn't it look interesting ( hope not weired ;) )
>
> > --
> > You received this message because you are subscribed to the Google
> > "QTP - HP Quick Test Professional - Automated Software Testing"
> > group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/MercuryQTP?hl=en

-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

Reply via email to