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
Explain the constants in vbscript?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
Explain about the asc function?
What is the use of the date function in the vbscript language?
Which function is used in the vbscript language to convert the specified expression into a date type value?
How to delete a cookie using vbscript?
PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com
What methods are used to create text files and open text files in the vbscript language?
How should i Create Email invite with server-side Coding?
How to assign a date value to a variable?
A folder is there inside no of textfiles are avilable. How do count the textfiles. Normally folder means we are using subfolder methods but textfiles is not working for subfolder methods and how do get file name also.
In what way program "hello world" you can write in vbscript?
In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?
How are values assigned to the variables in the vbscript language?
Which operator is used to concatenate the 2 values in the vbscript language?