Thanks a lot Amit On Monday, October 7, 2013 8:39:47 PM UTC+5:30, Amit Kumar wrote: > > another logic... > > Dim arr, res(), temp, count1 > count1=0 > arr=array(11, 11, 12, 13, 14, 13, 11) > ReDim preserve res(0) > res(0)=arr(0) > For i=1 to ubound(arr) > j=0 > Do while j <= ubound(res) > If arr(i) = res(j) Then > Exit do > End If > j=j+1 > Loop > > If j > ubound(res) Then > count1=count1+1 > ReDim preserve res(count1) > res(count1)=arr(i) > End If > Next > > For i=0 to ubound(res) > print res(i) > Next > > > > On Mon, Oct 7, 2013 at 4:21 PM, Amit Kumar <[email protected]<javascript:> > > wrote: > >> you can write the simpler one. >> >> Dim arr, res(4), temp, count1 >> count1=0 >> arr=array(11, 22, 33, 44, 22, 44, 55, 11) >> For i=lbound(arr) to ubound(arr) >> temp=i >> For j=i+1 to ubound(arr) >> If arr(i)<>arr(j) Then >> temp=temp+1 >> End If >> Next >> If temp=ubound(arr) Then >> res(count1)=arr(i) >> count1=count1+1 >> End If >> Next >> >> For i=0 to count1-1 >> print res(i) >> Next >> >> Thanks, >> Amit >> >> >> On Mon, Oct 7, 2013 at 3:27 PM, Venkat Kandula >> <[email protected]<javascript:> >> > wrote: >> >>> Hi Experts, >>> >>> I need a script for the below question. >>> >>> How to find the duplicate values in an array and Delete the Duplicate >>> values from the array. >>> >>> Thanks, >>> Venkat >>> >>> -- >>> -- >>> 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]<javascript:> >>> To unsubscribe from this group, send email to >>> [email protected] <javascript:> >>> 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 >>> Groups "QTP - HP Quick Test Professional - Automated Software Testing" >>> group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >> >> >
-- -- 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 Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
