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

Answer Posted / rico

If we pass the parameters by "Byval" the last two msgbox
statement will return "0"

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

Function fnmul(byval 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 0

msgbox mysub 'return 0

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the general steps involved in the data driven framework?

638


what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”

1580


How can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)

1623


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

1708


Suppose I want fail that check point? How can you do that?

713






What is the Command used to start the QTP

1612


Explain runtime dynamic settings?

2111


hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com

1509


Plz Explain AUTOMATION REFERENCE MODEL?

1763


What are the differences between quicktest professional and winrunner?

613


How to analyzing the checpoint results?

608


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1552


What is ObjectParamater?

1657


What are parameterizing tests?

626


What is data driver in qtp? Where we use it?

656