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



how can we return a value from userdefined function for eg 2 functions in func1 iam getting 2 value..

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

More QTP Interview Questions

QTP9.1 does not support to text checkpoint in Windows application? Is this correct? If this is correct, what is alternative for Text checkpoint?

2 Answers  


Why we are selecting QTP for testing ?

20 Answers   HP,


How can i count the list box elements in QTP ?using script plz explain me (Chandana)

6 Answers   Wipro,


How to compare the two strings?

2 Answers  


What is Parameterizing Tests?

1 Answers   Crea,


How to retrieve data from application objects?

1 Answers  


If some requirements r changed during the testing process ,then how can u handle this in frame work?

1 Answers  


how we connect 1. qtp9.2 to the quality center9.0? 2. Load runner8.0 to the quality center9.0

0 Answers  


what is use of the object repository?

4 Answers  


I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?

0 Answers   TCS,


DIFFERENCE BETWEEN WR 8.2 & QTP 8.2? HOW TO INTEGRATE WITH SOME OTHER TOOLS?

1 Answers   CTS, Maveric,


At a time how many users can access QTP?

5 Answers  


Categories