Is it possible to return multiple values from a function..?
Then how..?
Answer Posted / satish j
It is possible to return multiple values from a function?
Here I am taking the return values in an array and using
them as I want
mynum1 = 0
mynum2 = 0
dim linklist(2)
imax = ubound(linklist)
Function fncl1(ByRef mynum1,mynum2, x , y)
If i= 0 Then
z = "+"
Select Case z
case "+"
mynum1 = x +y
msgbox mynum1
fncl1 = mynum1
End select
else
z = "-"
Select Case z
case "-"
mynum2 = x- y
msgbox mynum2
fncl1 = mynum2
End Select
end if
End Function
For i=0 to imax
linklist(i) = fncl1(mynum1,mynum2,5,4)
If linklist(i) = mynum2 Then
Exit for
End If
Next
msgbox linklist(0)+linklist(1)
msgbox linklist(0)&","&linklist(1)
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain the difference between check point and output value?
what could go wrong with test automation?
What is checkpoint in qtp?
How to record application running on the Virtual machine?
what is the hierarchy to use properties in descriptive programming
How to run a test using quicktest professional (qtp)?
How to use output values in qtp ?
How many types of recording facility are available in quicktest professional?
How do Parameterization and Data-Driving relate to each other in QTP?
What is expert view in qtp?
Limitations in QTP?
Which recording modes need more memory?
What is the syntax to call one action in another?
How to find the length of the string in qtp?
what is vmodel?advantages and disadvantages of vmodel?