Write the vb script for the lowest and highest values of an
array?
Answer / pramod mallick
Dim x(5)
x(0) = 1
x(1) = 3
x(2) = 3
x(3) = 5
x(4) = 2
Dim y
Dim strArray
'Display
For y = LBound(x) To UBound(x)
strArray = strArray & x(y) & ","
Next
MsgBox "Before Sorting " & strArray
Dim z
'Demo loop
For z = LBound(x) To UBound(x)
For y = LBound(x) To UBound(x) - 1
Dim lower As Integer
Dim higher As Integer
If x(y) > x(y + 1) Then
higher = x(y)
lower = x(y + 1)
x(y) = lower
x(y + 1) = higher
ElseIf x(y) > x(y + 1) Then
higher = x(y)
lower = x(y + 1)
x(y) = lower
x(y + 1) = higher
Else 'equal
'do nothing
End If
Next
Next
'Display
strArray = ""
For y = LBound(x) To UBound(x)
strArray = strArray & x(y) & ","
Next
MsgBox "After sorting " & strArray
msgbox "Lowest is " & Lbound(x) & "Highest is " Ubound(x)
| Is This Answer Correct ? | 3 Yes | 1 No |
wt is the difference between global and action excel database in qtp?for example one action is calling another action the second action is using action excell sheet?if it is using global sheet what makes the difference?
In QTP, If you have list of checkboxes, how can i select a particular checkbox and delete if the checkboxes are changing dynamically?
Explain the check points in QTP?
who is developed QTP ? is it from Mecury or HP
How can you identify the browser and its information using QTP script?
How do you start automating/ writing your QTP scripts ?
what is descriptive.create()in qtp?
What is the differnce between action & script
How to create log file in qtp?
How to create a Runtime property for an object in QTP?
How to automate the windows dialog box which is coming in the run mode? Whenever I run my scripts,I am getting dialog box ( for ex: Pls enter zipcode" eventhough I already entered the value,the dialog box pops up).I need to click it. Pls give some idea-How to automate the dialog box which is pop up in the runtime.
Hi All, What is an XML Checkpoint in QTP? How can i use it while testing a web application? Kindly explain in detail. Thanks in advance