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
how can we return a value from userdefined function for eg 2
functions in func1 iam getting 2 values(a,b) and storing in
var(C). now i want to pass that var(c) to another func2 give
me the script
 Question Submitted By :: Shavali
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how can we return a value from userdefined function for eg 2 functions in func1 iam getting 2 values(a,b) and storing in var(C). now i want to pass that var(c) to another func2 give me the script
Answer
# 1
Function returns only one value.  when we assign the final 
value with variable that name should be the same name of 
the function name.

In the given example, som is the function it returns the 
sum of two values when we assign that value to variable[i.e 
same as function name(example: som = c)]

if you don't assign, function doesn't return any value
(example: z = c)

Example:

Function som(a, b)
c = a + b 
som = c '(instead of these two step we can write in single 
step like som = a + b)   
End Function

x = 10 + som(10, 20)
msgbox x

you can pass this value in any other function.

Example:
y = som(som(10, 20), x)

msgbox y
 
Is This Answer Correct ?    1 Yes 0 No
Nath T
 

 
 
 
Other QTP Interview Questions
 
  Question Asked @ Answers
 
i'm using QTP 8.2, How should i select(browse) object repository from desktop(or from local local drives like C:\,D:\)?. Note:- object repository to select(browse) is been sent by some other person who is using QTP 9.0  1
what is run-time object property in Object spy in QTP9?  2
How to enter table check points?  2
how to merge object repositories?  4
How will u find that how many List boxes( and check boxes) are present in one particular window  8
How to invoke Mozilla from QTP thru VB Script  1
What type of framework you are using in your company and explain it? CTS4
How to Parameterize Object repository in QTP?  1
What are Test case selection criteria for Automation?  2
How the automated tests in org Maintec1
what is vmodel?advantages and disadvantages of vmodel? AZTEC3
I learned all the objects of my application in object repository thru English Language. now i want to use same object repository for other languages(French,Dutuch and Chinese) Wipro1
what is use of optionexplicit in variable declaration GE4
Hello Everyone, I have a problem. QTP is capturing no action on a particular page in the application that I am trying to automate. But on the same side its working fine on other pages of the same application. Can someone please help me understand the reason behind this inconsistency.  1
does automation replace manual testing?  2
explain keyword driven framework? Mindlance2
what is meant by keyword driven frame work can any one answer plzzzzzzzzzzz  1
How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)  5
how do pass parameters from one action to another action  1
what is defination of intergration testing?  2
 
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