Yeah.......It's an interesting thing and also unaware thing. Thanks to iRahulSingh for sharing it with us.
Regards, Srinivas On Sat, May 5, 2012 at 2:48 PM, iRahulSingh <[email protected]>wrote: > Hi Sudarshan, > > Thank you for the code but my point was just to show the peculiarity of > FOR loop in vbscript. It was kind of strange and hence thought of sharing > the same with you all . > > Thanx for replying though :) > > > > On Friday, May 4, 2012 2:06:12 PM UTC+5:30, Sudarshan v wrote: >> >> Hi Rahul, >> >> I think below code reach u r expectation once check it >> >> p=5 >> for j=1 to p >> if j = 3 then >> p=4 >> for i=2 to p >> msgbox i >> next >> end if >> next >> >> >> >> >> Thanks&Regards, >> >> Sudarshan >> >> >> >> >> On Fri, May 4, 2012 at 12:51 PM, ashok n <[email protected]> wrote: >> >>> Hey p will be 5 upto execute last .. because script wont goto for >>> statement if it enters once .. >>> >>> so thats whay it is executing upto 5 times. >>> >>> Regards >>> Ashok.N >>> >>> On 5/4/12, ashok n <[email protected]> wrote: >>> > hey its unexpected yaar.. >>> > >>> > how come 5 is printing is there any concept of byref and byval >>> > >>> > Regards >>> > >>> > Ashok.N >>> > >>> > On 5/3/12, Anish Pillai <[email protected]> wrote: >>> >> Interesting Find.. :D >>> >> >>> >> I was not aware of this.. If you put msgbox after for loop it will >>> show >>> >> value 4. That means that the value of gets updated. But the number of >>> >> iterations didn't change. Time to revisit the documentation.. :) >>> >> >>> >> >>> >> * >>> >> Cheers, >>> >> a n i s h >>> >> >>> >> [QTP >>> >> Tutorial]<http://www.**automationrepository.com/** >>> tutorials-for-qtp-beginners/<http://www.automationrepository.com/tutorials-for-qtp-beginners/> >>> >| >>> >> [VBScript >>> >> Tutorial]<http://www.**automationrepository.com/** >>> category/qtp-and-vbscript-**tutorials/<http://www.automationrepository.com/category/qtp-and-vbscript-tutorials/> >>> >| >>> >> [QTP >>> >> Blogs] >>> >> <http://www.**automationrepository.com/qtp-**blogs/<http://www.automationrepository.com/qtp-blogs/> >>> > >>> >> >>> >> ** >>> >> [** Subscribe to Get New Posts in your Inbox >>> >> **]<http://feedburner.google.**com/fb/a/mailverify?uri=** >>> automationrepository/feeds<http://feedburner.google.com/fb/a/mailverify?uri=automationrepository/feeds> >>> > >>> >> * >>> >> -- >>> >> ar >>> >> >>> >> -- >>> >> 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 >>> >> MercuryQTP+unsubscribe@**googlegroups.com<mercuryqtp%[email protected]> >>> >> For more options, visit this group at >>> >> http://groups.google.com/**group/MercuryQTP?hl=en<http://groups.google.com/group/MercuryQTP?hl=en> >>> >> >>> > >>> > >>> > -- >>> > Cheers, >>> > >>> > Ashok Kumar.N >>> > +91 9972628339 >>> > >>> >>> >>> -- >>> Cheers, >>> >>> Ashok Kumar.N >>> +91 9972628339 >>> >>> -- >>> 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 >>> MercuryQTP+unsubscribe@**googlegroups.com<mercuryqtp%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/**group/MercuryQTP?hl=en<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 > -- 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
