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 Posted / 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 |
Post New Answer View All Answers
Explain how you can find the absolute value of the number in qtp?
Explain the differences between table and db checkpoints?
Diff b/w test scenario's and test Procedures?
What are the Test design techniques you uses in ur project?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
what is description object?
HOw to add the recovery file at runtime to the test file .
Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link
can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com
Give me some real time point of way where exactly we can conduct audits?
How to create runtime property for an object?
What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.
How qtp recognizes the object?
How to use actions in qtp ?
How do client side image and server side image work?