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 |
How do you copy a value from a cell in an msexcel sheet saved on the desktop into QTP's datatable when the co-ordinates of cell are given?
Hi let me ask one questin 1.How to use outputof the one function input to the another function pls give the script for above 2.what is the purpose of action parameter , how to create it
What the genaric function to connect Sql Server using Sql Server Authentication and Windows Authentication
IF THE GUI OF APPLICATION IS CHANGED THEN IS THERE ANY NECISSITY TO CHANGE OR UPDATE OUR TEST SCRIPTS
I have qtp 9.5 demo ver,I am not able to record the yahoo broeser.so anyone can tell me what setting i have to do in QTP for yahoo brower recording. why its not recognise the object of yahoo browser????
Plz write the code, function will take the parameter as month number, i.e., numerical value, but it returns the last day of the month in string (weekday). example: input: function parameter: 3(march) output: thursday
Plz explain about object propeties in object identification? means.. explain about 1. mandatory properties.2. assestive properties 3. ordinal properties.
I am trying to write a descriptive program for clicking on a perticular link.For that i wanted an index or location of that object.But when I viewing through spy, There was no index property of that object.What to do for getting index value.How can I get index? please any one let me know.
Tell me Three major differences between QTP & Winrunner?
why text area checkpoints cannot used for web applications
can the activities of test case design be automated?
What is a programmatic description?