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 userdefined function for eg 2
functions in func1 iam getting 2 values(a,b) and storing in
var(C). now i want to pass that var(c) to another func2 give
me the script

Answer Posted / nath t

Function returns only one value. when we assign the final
value with variable that name should be the same name of
the function name.

In the given example, som is the function it returns the
sum of two values when we assign that value to variable[i.e
same as function name(example: som = c)]

if you don't assign, function doesn't return any value
(example: z = c)

Example:

Function som(a, b)
c = a + b
som = c '(instead of these two step we can write in single
step like som = a + b)
End Function

x = 10 + som(10, 20)
msgbox x

you can pass this value in any other function.

Example:
y = som(som(10, 20), x)

msgbox y

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how you can find the absolute value of the number in qtp?

1022


Explain the differences between table and db checkpoints?

945


Diff b/w test scenario's and test Procedures?

2070


What are the Test design techniques you uses in ur project?

1906


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

1952


what is description object?

1990


HOw to add the recovery file at runtime to the test file .

2108


Write the code for,In the page screen we have total 10 Links,out of these I have to click 9th link

1263


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

2168


Give me some real time point of way where exactly we can conduct audits?

1865


How to create runtime property for an object?

1913


What is the use of defining a newobject in the object repository "Define New TestOject". How to use this further. If we define new testobject, how can it recognizes the objects properties of any application.

1984


How qtp recognizes the object?

1103


How to use actions in qtp ?

994


How do client side image and server side image work?

1772