Is it possible to return multiple values from a function..?
Then how..?

Answer Posted / rico

One way of getting mutiple values from function is by
passing values "ByRef" to the funtion and storing the
return values in the one or more arguemnts passed to the
functions.

Ex :
mysum = 0
msgbox mysum ' return 0
mysub = 0
msgbox mysub ' return 0

Function fnmul(byref mysum, mysub, x , y)

mysum = x + y
msgbox mysum 'return 9
mysub = x - y
msgbox mysub 'return 1

End Function

Call fnmul( mysum, mysub, 5, 4)

msgbox mysum 'return 9

msgbox mysub 'return 1

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can u explain relative path architecture framework in qtp?

1563


To which environments does quicktest professional supports?

543


When you open QTP, how many sheets you can see?

664


What is the difference between run time object and test object?

583


How to capture a window in QTP?

1530






What are the recording modes in qtp?

588


What is recovery scenario in qtp?

587


Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?

1496


How can i get the image text that changes dynamically? Here i have used "GetROProperty", but it's not working. I used like Ex:Browser("webmail").Page("inbox").image ("captchaimage).getroproperty("innertext/text/value")

1425


What is the difference between local and shared object repository in qtp?

567


What is QTP and the use of QTP in TD?

602


What is synchronization? What are the ways you can synchronize?

653


Give me At Least 5 Differences between DOCUMENTATION OBJECT MODEL(DOM)and COMPONENT OBJECT MODEL(COM)? Interviewer said me to WRITE the difference only in points not as you WRITE a paragraph ???? only in points

1633


descriptive program for a yahoo mail that is in yahoo mail suppose check box mailid subject assume it is like this format all things are in webtable the question is suppose some mail ids are there in that mailids i want to select the check box wich is before a@gmail.com and after that i want to click on delete button

1812


When to use descriptive programming?

595