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 to return a value from a fn, if it has more than one value
how to return

Answers were Sorted based on User's Feedback



How to return a value from a fn, if it has more than one value how to return..

Answer / bantanahal haribabu

Dim odd()
cnt=0
Function oddnum(srange,erange)
For i=srange to erange
If i mod 2<>0 Then
ReDim preserve odd(cnt)
odd(cnt)=i
cnt =cnt+1
End If
oddnum=odd
Next
End Function
var=oddnum(1,20)
msgbox isarray(var)
For i=lbound(var) to ubound(var)
print var(i)

Next

Is This Answer Correct ?    5 Yes 1 No

How to return a value from a fn, if it has more than one value how to return..

Answer / kishan

dim arr(4) 'declare the array if necessary
function myfunction()
....
....
....
myfunction=arr 'here arr is an array

end function




Point to Remember:
1. store req values in a array and assign that array to
function name (or)
2. Concatenate all the multiple values and assign it to
function name

Is This Answer Correct ?    2 Yes 0 No

How to return a value from a fn, if it has more than one value how to return..

Answer / ram

There is only way to return more than one value that is by using call by reference. we can call function by reference passing an object.steps
1. Create class
2. Declare more than 2 elementes
3. Create object of the class
4. Call function by passing that object


please let me know if I am wrong.


Ram

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More QTP Interview Questions

I m new to QTP? Is it necessary to know VB for learning QTP for Automation? Can I understand QTP excellently Without practical automation?

3 Answers  


actuall wat my doubt is:while doin regression testin we enter all +ve & -ve data....system has to accept +ve and reject -ve data.in such case we get a popup window sayin that wrong entry...now i wan to overcome this popup window..how do i go further....plz explain.i tried thru rec.scenario but of no use.

1 Answers  


can we use QTP for load testing instead of load runner?

3 Answers  


any one could you explain the following code with example: intFieldItemsCnt =CInt(GetProperty(Browser ("Browsername").Page("Pagename").Weblist ("weblistname"),"items count")) msgbox intFieldItemsCnt

1 Answers  


Can any one please explain hwo to test client/server application using QTP?

3 Answers   Patni, Value Labs,


If u prepare bug report in Excel sheet . Is it possible to send thrw Test director? how it is?

3 Answers   Wipro,


QTP Data Table Having 10 records with 10 to 15 fields(lets say).now i want to get alternative records from datatable.pls can any one answer it?

3 Answers   Syntel,


str="ramanareddy12345@gmail.com"to count alphabets,numarics and special charcters pls any one knows send to answer

3 Answers   Ziynx,


can any one say that where we can download the QTP trail version ??????????

0 Answers  


How many ways return more then one value from function?

2 Answers   Ingram Micro,


What is driver script and driver script in qtp frame work????

6 Answers   IBM,


What are the types of data tables in qtp?

0 Answers  


Categories