ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Testing  >>  Automation Testing  >>  QTP
 
 


 

 
 WinRunner interview questions  WinRunner Interview Questions
 Load Runner interview questions  Load Runner Interview Questions
 QTP interview questions  QTP Interview Questions
 Test Director interview questions  Test Director Interview Questions
 Rational TestSuite interview questions  Rational TestSuite Interview Questions
 Silk Test interview questions  Silk Test Interview Questions
 Automation Testing AllOther interview questions  Automation Testing AllOther Interview Questions
Question
Is it possible to return multiple values from a function..?
Then how..?
 Question Submitted By :: Aravarajesh456
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Is it possible to return multiple values from a function..? Then how..?
Answer
# 1
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 ?    2 Yes 1 No
Rico
 
  Re: Is it possible to return multiple values from a function..? Then how..?
Answer
# 2
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 1 No
Rico
 
 
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
what is aregular expression? UHG3
What is error handled other than recovery scenario manager?  1
what are the challenges do we face while testing webbased applcations using the automation tool QTP or any? BirlaSoft4
Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri  3
What is the diff between doing parametarisation using Data Driven wizard or manually. when do we go for manual para...and when do we use Data driver wizard..can anybody answer it ..Thanks in advance Siemens5
what is frame work of qtp? ITC-Infotech3
hi testers,one script has three actions , at the of running three actions are running , how to set run only perticular action and what is the use of split the action? when it will be useful? Syntel2
How can I replace all the text from the QTP script with some other text. Livetek1
how to merge object repositories?  3
how to use import and export sheet methods in qtp  1
what is the Exact Meaning of Environment Variables? AppLabs7
I want to check in the data table(Globalsheet) column exist or not through script .If column not exist only proceeded to next step Pls tell me how to proceeded? Syntel3
how do u copy object repository?  1
Explain the keyword createobject with an example.  1
How the exception handling can be done using QTP  5
Can you tell me any books or websites to learn VB Script for QTP ??  1
what is exact difference between smoke and sanity testing? Satyam6
how can i prepare for QTP(8.2) to face interview ? give over view details?  42
Write the Test Cases for ATM(Any Time Money) SpaceLabs2
what are the Tools for version control?  3
 
For more QTP Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com