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...


can a Function return more than one value..??? if so please
give me the code for that.

Answers were Sorted based on User's Feedback



can a Function return more than one value..??? if so please give me the code for that...

Answer / bantanahal haribabu

function exmp(a,b)
dim myarray(2)
myarray(0)=a+b
myarray(1)=a*b
exmp=myarray
end function
val=exmp(2,3)
msgbox isarray(val)
for i=o to ubound(val)
msgbox val(i)
next

Is This Answer Correct ?    4 Yes 0 No

can a Function return more than one value..??? if so please give me the code for that...

Answer / prasad

Function alway returns one value. only action in QTP
returns more than one values.

Is This Answer Correct ?    3 Yes 0 No

can a Function return more than one value..??? if so please give me the code for that...

Answer / siqtp

Logically Function can return pnly one value.But we can
achieve rturning multiple values using any of the following

1)Concatenate all the values to be returned to a string and
retuen it
2)Use arrays
3)Use dictionay object
4)use ByRef

Is This Answer Correct ?    2 Yes 0 No

can a Function return more than one value..??? if so please give me the code for that...

Answer / uday kumar _ anem

Another way to handle more than one return value is using
arrays and also use global variables.

Is This Answer Correct ?    2 Yes 1 No

can a Function return more than one value..??? if so please give me the code for that...

Answer / nath t

Function doesn't return more than one value.

if you want to get more than one result, we can write
function for that. After u will get the value u have to
split the value.

Example:

Function AddSub(a, b)
som = a + b
subt = a - b
AddSub = som&"/"&subt
End Function

this function returns only one value. But it's having two
results(i.e Addition and subtraction of two no.s).

After u will get this value. u have to split that one for
two results by using split function here delimeter is "/".

like this we can add more than one result to the return
variable(in this example AddSub is the return variable).

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More QTP Interview Questions

Describe the process for writing text check point for a web application?

2 Answers   ssinformatics,


How to create a standard checkpoint ?

0 Answers  


Give answer with example what is orthogonal array testing technique?

1 Answers   CTS, Wipro,


In a web site, Protocal has been changed http: to https: what is your approach?

2 Answers  


Hi, this is venkatesh. Q: I have 10 files in a folder(say D:\). Out of which there are some .txt, .xls, .doc. I want to know how to get the count of each file using qtp? If U have any ans, plz write script for that...

4 Answers   EDS,


Please let know the scripts for counting number of repeated letters in the word. Note repeated letter should not be count agian. Ex: If "Hello" is my word... l is coming twice.. it should count once and print... secong 'l' should not count again..

1 Answers  


Will down time for server and content maintenance/upgrades be allowed? how much?

0 Answers  


i am giving.multiple names like ram,raj,san etc....pls enter & search these names in google pade edit box through script... i told to interviewer, using Ms excel & test easily..but interviwer not happy with that answer?

2 Answers   Accenture,


Few basic questions on commonly used Excel VBA functions.

1 Answers  


how qtp identifies objects of application.

5 Answers   Intel,


What is deference between normal QTP testing and descriptive programming?

4 Answers   Polaris,


Explain the concept of object repository and how quicktest professional recognises objects?

0 Answers  


Categories