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 / varun
dim a,b,c
fun1 a,b,c
fun2 c
msgbox("done")
sub fun1(a,b,c)
a = cint(inputbox("first number"))
b = cint(inputbox("second number"))
c = a + b
End sub
sub fun2(c)
msgbox(c)
end sub
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
What is the difference between vbscript and vba?
What is the use of the formatdatetime function in the vbscript language?
Difference between dim,public and private variables in vb script?
What is the technology used by vb script?
Mention what is byref and byval parameters in vbscript?
How to capture a runtime error in vbscript?
Explain the arrays in vb script?
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?
Explain about tristate constants?
Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP
What are the 2 ways to pass a value to the function?
how to write a vb script in QTP for yahoo registration form, i want to check the performance also like performance test, stress, load test like that.
Mention the environments where vbscript could be run?
while using Keyward driven framework in QTPif new requirements are added how to manage it...plz ans