How can we return a value from User Defined Function ?
For Eg. we have 2 functions. In Fun1 i am getting 2 values
(a,b) and i am addding those 2 and storing in to another var
(c). Now i want to pass that var(c) to another function
(fun2). What will be the script?
Answer Posted / sangee
Call add(40,20,c)
Call subs(c,10)
Function add(a,b,c)
c=a+b
msgbox c
End Function
Function subs(c,d)
e=c*d
msgbox e
End Function
| Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?
Out of the different type of operators, which are evaluated first and last in the vbscript language?
What is the purpose of the err object in the vbscript language?
Why is the use of exit do or exit for statements within loops discouraged?
What are the 2 ways in which a variable can be declared in the vbscript language?
when we use filter funtiom invb script(QTP)
how to increase the values in text box in a given text box increament by two values by clicking on button
Explain about the extension .hta?
Explain the tristate constants in vbscript?
What is the use of the instr function?
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
wat is the com(common object model)object for mozilla firefox???????plz if any one know the exact answer....reply me......
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
How to replace junk code recorded by QTP with a mall function.
Which function is used to perform string comparison?