Just correcting few things in Bhavin's code... since earlier code would have
given out of bound range exception for Inner For loop...!!!

NjOY.. :)

list=Array("A","G","H","J")

listCounter=(UBound(list)-LBound(list))+1
int_sorting_Counter = 0

For i=0 to listCounter - 1
    For j=1 to listCounter - 1
        If list(i)<list(j) Then
            int_sorting_Counter = int_sorting_Counter + 1
        End IF
    Next
Next

If int_sorting_Counter > 0 Then
    msgbox "Value is in ascending order "
Else
    msgbox "Value is not in ascending order "
End If*

*
Regards
Shalabh Dixit



On Sat, Aug 20, 2011 at 12:52 AM, bhavin v patel <[email protected]> wrote:

> So here is a sudo code for that
>
> I am guessing your list is in array and u want to check that list is
> in Ascending order.
>
> list=Array("A","G","H","J")
>
> listCounter=(UBound(list)-LBound(list))+1
>
> For i=0 to listCounter-1
>
>   For j=1 to listCounter
>
>   If list(i)<list(j) Then
>      msgbox "Value is in ascending order "
>   Else
>       msgbox "Value is not in ascending order "
>   End IF
>
>    Next
> Next
>
> Now you need to modify based on your actual requirement..
>
> Bhavin
>
>
>
>
>
> On Aug 19, 6:16 am, Blessy <[email protected]> wrote:
> > Hi,
> >
> > Please let me know how to verify that a list is showed in a particular
> order in qtp.
> >
> > For eg. The sequence in the report should be:
> > A
> > G
> > H
> > J
> >
> > We need to verify thru qtp that the order is appears like above.
> >
> > Thanks,
> > Deepti.
>
> --
> 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