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
What is the purpose of loading qtp add-ins?
Explain sub procedure of vbscript.
How to sendKeys in QTP? Diff b/w sendkeys and device replay? Diff b/w function and Sub? Diff b/w Array and List Different Types of running Keys other than Fast, slow,Normal mode Regular expression for http://newtours.demoaut.com Difference between \w and \W How to generate script button Recording Types Different Types of Actions? Using DP performance degrades, If Yes why? How to close all the opened browsers? Diff b/w SystemUtil.Run and invoke application? If qtp not recognized the combo box How to select values from drop down?
What is the new version of qtp which is recently released in the market?
What are the check points can be inserted without recording?
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
How many add-ins comes by default with quicktest professional?
How to import a test case present in ".xls" file to TD under a Test set?
Could anyone help me for the below scenario: i am using the descriptive programming for my account, in which we have to generate the contract in the MS-word. when i generate this doc, we need to click on enable macros to continue further. but i am unable to make qtp to click on this. if anybody faced the problem like this??? pls help to get it resolved? Thanks in advance
Can launch two instances of qtp on the same machine?
What is the difference between run time object and test object in QTP?
What is output value? How many types of output values are there in qtp?
What are the different types of qtp test assets and their extensions?
What do you mean by iteration?
Explain the concept of object repository and how qtp recognises objects?