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   To Refer this Site to Your Friends   Click Here
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
 
Hi I have created a table in the MS access database. I want to access the table in this database through QTP. The code is given below. The code is not working.The following error is displayed "Data source name not found and no default driver specified". Any one can correct the code. Thanks in advance. Dim dbconnection, rs Dim ca, sname Set dbconnection = createobject("ADODB.Connection") Set rs = createobject("ADODB.Recordset") dbconnection.open "DSN = MS Access Database","", "" rs.open "select * from Research", dbconnection rs.movefirst If rs.EOF <> True AND rs.BOF<> True then ca = rs("order_number") sname = rs("customer_number") rs.movenext msgbox ca msgbox sname End If  1
Is it possible to run QTP scripts created in IE 6.0 in IE 7.0? TCS4
What is difference between function and procedure? Wipro15
how we can do web browser using parametarisation in QTP ? Kanbay2
Write the Test Cases for ATM(Any Time Money) SpaceLabs3
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? Syntel4
what type of test cases tou will automate? Google3
What is a runtime datatable ? Ordain-Solutions2
What are the most frequent errors you faced while executing your scripts? Semantic-Space3
if interviewer asked about the framework used for automation how we will handle the question..means what should be the answer..plz help..which framework u r used in our company? iGate1
Hi all. Could anyone tell me the difference between an Action and a Function in QTP. Thanks in advance and Merry Christmas. IBM3
Hey friends i m facing a problem when i m running my script in qtp it waits for about 5-10 secs before starting execution why it is so can any one solve my problem .Previously it was running fine  1
hi friends i was tried to connect qtp with oracle database using provider.i got a error.so anyone can help me out by correct script  2
Hoe to generate all numbers in between to numbers suppose all numbers in between 1 to 100 using vbscript give me code  1
How the automated tests in org Maintec1
Hi All, What is an XML Checkpoint in QTP? How can i use it while testing a web application? Kindly explain in detail. Thanks in advance  2
What is the use of Testing framework in Automated testing..what are different kinds of Testing frameworks available in Automated testing... IBM1
Can anybody give the script to addsheet, add column,add values under that column in the rows?? AZTEC5
Can any one give me some basic VB script used in QTP ?As i am new in QTP.Give sample VB script used in QTP? PLZ  1
Can we continue functionality testing without framework?  4
 
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