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 |
QTP9.1 does not support to text checkpoint in Windows application? Is this correct? If this is correct, what is alternative for Text checkpoint?
Why we are selecting QTP for testing ?
How can i count the list box elements in QTP ?using script plz explain me (Chandana)
How to compare the two strings?
What is Parameterizing Tests?
How to retrieve data from application objects?
If some requirements r changed during the testing process ,then how can u handle this in frame work?
how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0
what is use of the object repository?
I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?
DIFFERENCE BETWEEN WR 8.2 & QTP 8.2? HOW TO INTEGRATE WITH SOME OTHER TOOLS?
At a time how many users can access QTP?