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

How does quicktest professional (qtp) identifies the object in the application?

583


what is the diffrence bw qtp architectute and qtp framework?

1544


Why qtp always start action1 and does not start action?

607


With what extension you can save the list of tests in a file to run in test batch runner?

571


How to open a new test using quicktest professional (qtp)?

535






What is the file extension of the code file and object repository file in QTP?

605


What are the different recording modes and how do they work?

622


I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????

2157


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

570


How qtp identifies objects?

573


assume i have few url link how will i dynamically call then using descriptive programming?

1605


What is text/text area checkpoint?

567


what is defenetion of kiran can u tell me plz CVS, SVN

1573


we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

1636


How you create new action in qtp?

571