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
How should i Create Email invite with server-side Coding?
Explain about filter expression?
What is difference between vbscript and vba?
Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?
Explain about scrrun.dll?
Explain about constants in vb script?
Explain sga memory structures?
How to pass argument by reference to a function in vbscript?
how to write validation function for date in vb script
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
How will you format a number in percetage format in vbscript?
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?
What is dictionary object in vbscript? Explain?
Explain few date functions in vbscript?
How to write functions and sub in vb script?