can a Function return more than one value..??? if so please
give me the code for that.
Answers were Sorted based on User's Feedback
Answer / bantanahal haribabu
function exmp(a,b)
dim myarray(2)
myarray(0)=a+b
myarray(1)=a*b
exmp=myarray
end function
val=exmp(2,3)
msgbox isarray(val)
for i=o to ubound(val)
msgbox val(i)
next
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / prasad
Function alway returns one value. only action in QTP
returns more than one values.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / siqtp
Logically Function can return pnly one value.But we can
achieve rturning multiple values using any of the following
1)Concatenate all the values to be returned to a string and
retuen it
2)Use arrays
3)Use dictionay object
4)use ByRef
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / uday kumar _ anem
Another way to handle more than one return value is using
arrays and also use global variables.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / nath t
Function doesn't return more than one value.
if you want to get more than one result, we can write
function for that. After u will get the value u have to
split the value.
Example:
Function AddSub(a, b)
som = a + b
subt = a - b
AddSub = som&"/"&subt
End Function
this function returns only one value. But it's having two
results(i.e Addition and subtraction of two no.s).
After u will get this value. u have to split that one for
two results by using split function here delimeter is "/".
like this we can add more than one result to the return
variable(in this example AddSub is the return variable).
Is This Answer Correct ? | 2 Yes | 5 No |
Hi any body can tell me the in detaled information about Description.Create() thanks in advance
Explain data driven framework?
In qtp,how to interact tool & application build?
I have a tool for automation testing (eg:qtp).I have two functionality(A & B) to test.A is tested once in a year. B is tested everyday. At present i have the money and resource availability to automate only one functionality.Which one will u suggest and why?
How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application. plz explain in detailed or mail the sample code to malepatin@gmail.com
can u put checpoints for moving images
QTP Testing Process?
Explain the check points in QTP?
Hi, Plz give best Definition of Software Testing? Why we need Software Testing? and plz send 2+yrs experience Interview qutions (Manual,Qtp).
DIFFERENCE BETWEEN WR 8.2 & QTP 8.2? HOW TO INTEGRATE WITH SOME OTHER TOOLS?
Explain how to use QTP to check broken links on a page?
when we enter url,one page should open.write a vb script ,that page is open or not
2 Answers Blue Chip India, Persistent,