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 / siri
'vbscript
dim a:a=20
dim b:b=30
dim d
d=add(a,b)
call subtract(d)
function add(a,b)
dim c
c=a+b
add=c
end function
function subtract(d)
dim f:f=10
dim e
e=d-f
msgbox e
end function
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
What are the 2 ways to pass a value to the function?
How to get the length of the string by making use of the string function?
Mention what is vbscript procedures?
Which date function is used in the vbscript language to find the difference between the 2 dates?
What are the environments supported by vbscript language?
How to add actions in driver script to run those actions in QTP?
How to capture a runtime error in vbscript?
what is the features of visual basic?
Which object is used to work with the database in the vbscript language and what statement is used to create this object?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?
Explain vbscript in detail?
Can u describe what kind of testing are for OTC derivates by banks.
How are values assigned to string type and numeric type variables?
How do you declare a variable in vbscript?
Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).