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 / nath t
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 ? | 6 Yes | 2 No |
Tell me Three major differences between QTP & Winrunner?
How many ways is to parameterize the value?
How can I test the unix shell in QTP
We stored into the objects OR and then write the scripting
what is the difference between action and function
11 Answers AppLabs, BirlaSoft, Infosys,
Explain how you can delete excel file in qtp?
How many ways we can parameterize data in quicktest professional (qtp)?
we have a link in a website or webtable How can we record link in that table or site? link is not static we don't know exact location of that link? how ? if u know pls give reply with script also?
6 Answers Cognizant, Covansys,
What is the Diff between Image check-point and Bit map Check point?
What is Test Fusion Report in QTP?
What is optional step in qtp? How you can add optional step in qtp?
What is the differnce between action & script