write vb script code to delete the duplicate values in an
array.

Answer Posted / bhaskar sarma

Input = Array(6,6,6,7,6,75,78,75,75,6,66,6.6)
count = 0
arr = ","

for Bye =0 to ubound(input)-1 step 1

for Hello=Bye+1 to ubound(input) step 1

if strcomp(Input(Bye),Input(Hello),1)=0 AND instr(1,arr,Input(Hello))<=0 then
count = count + 1
arr = input(Hello) & ","
exit for
end if
next
next

msgbox count

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of environment variables in qtp?

544


write a script for allinterview-submit Question first we've to select Choose Category,second select Sub- Category(Which is comes in to runtime)third select Question Type.for that give some descriptive and vb script

1361


What are test settings and global settings?

579


What are some test assets and related extensions of qtp?

555


What are the key elements available in test result window?

624






how to compare two bitmaps( 1. clients requirement & 2. Designed by dev) in qtp 8.2 wann clear steps

1673


What is 'sleep' in sync point?

624


What is ObjectParamater?

1571


What are the views available in quicktest professional?

562


What phases are involved in testing an application in qtp?

560


Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John

2167


Through array we can execute the testcase how ? give me example

1401


What is optional step in qtp? How you can add optional step in qtp?

534


hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?

1584


How will you report the bug and explain the defect tracking sheet you handled?

2552