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 / sangee

Call add(40,20,c)
Call subs(c,10)
Function add(a,b,c)
c=a+b
msgbox c
End Function

Function subs(c,d)
e=c*d
msgbox e
End Function

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which date function is used in the vbscript language to find the difference between the 2 dates?

1026


What are the naming conventions while declaring a variable in the vbscript language?

1004


Which event is triggered when mouse focus comes out of an element in the vbscript language?

927


Which in-built function is used to format the number in the vbscript language?

963


How to take whole text output from screen of Bitmap Application.

2329


How to assign a date value to a variable?

1058


Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

2256


What is loose binding? Why is it not a good practice to use it?

1066


What is the use of the recordset object and which statement is used to create such an object?

936


Which operator is used to perform the comparison among 2 operands in the vbscript language?

915


What are class events?

938


How to access array data?

960


Which object is used to work with the excel sheets in the vbscript language and what statement is used to create this object?

927


Please let me Know regarding any material regarding VB Scripting which should be easily understandable for Beginners.

1994


When are redim statement and preserve keyword used in the vbscript language?

1002