Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How should i Create Email invite with server-side Coding?

2075


Explain about filter expression?

945


What is difference between vbscript and vba?

1136


Write a vbscript procedure that converts feet to inches. Hint: there are 12 inches in a foot?

997


Explain about scrrun.dll?

912


Explain about constants in vb script?

985


Explain sga memory structures?

978


How to pass argument by reference to a function in vbscript?

999


how to write validation function for date in vb script

2559


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

2596


How will you format a number in percetage format in vbscript?

943


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?

3988


What is dictionary object in vbscript? Explain?

1133


Explain few date functions in vbscript?

1012


How to write functions and sub in vb script?

1065