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

By default in vbscript the arguments passed to functions and subroutines are by reference or by value?

1018


What are lbound and ubound in the vbscript language?

1021


What are events in the vbscript language?

1043


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1966


What's the difference between vbscript and vb.net?

1032


Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?

906


Which function is used to perform string comparison?

1052


Explain about the functionality of vb script?

921


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

2299


What are class events?

924


Is vbscript language a case-sensitive language and what does it mean?

943


How will you get a combined string from array of string in vbscript?

897


How to add actions in driver script to run those actions in QTP?

1888


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

1975


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

2782