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 many ways return more then one value from function?

Answers were Sorted based on User's Feedback



How many ways return more then one value from function? ..

Answer / suresh

what is mean by that script, which statements u can write in QTP TOOL and which statements u can write in Out side QTP? write with clesr info?

Is This Answer Correct ?    4 Yes 0 No

How many ways return more then one value from function? ..

Answer / kurubaharibabu

Dear All,
I have updated all three ways the below code..



Function func1(a,b)
Dim c(3)
c(0)=a+b
c(1)=a-b
c(2)=a*b
func1=c
End Function
x=func1(2,3)
For i=0 to ubound(x)-1
msgbox x(i)
Next
'=====================================================
Function func2()
Dim c
c=array("har","babu")
func2=c
End Function
x=func2()
msgbox x(0)
msgbox x(1)
'===========================================================
Function func3()
Set dic=createobject("Scripting.Dictionary")
dic.Add "a","apple"
dic.Add"b","bal"
dic.Add"c","cat"
Set func3=dic
End Function
Set x=func3
msgbox x.Item("a")
msgbox x.Item("b")
msgbox x.Item("c")
'============================================================
Class user
Public var
Public cat
End Class
Function func4()
Set obj=new user
obj.var="hari"
obj.cat=123
Set func4=obj
End Function
Set x=func4()
msgbox x.var
msgbox x.cat
'===================================================================

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More QTP Interview Questions

When Recovery scenario actually starts while testing the application?

0 Answers   SAP Labs,


Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

0 Answers   Autodesk, EDS, Wipro,


How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers  


More details about keyword driven technique in QTP

1 Answers   TCS,


How you debug your script?

0 Answers  


how to write scripts in QTP?

4 Answers   Ordain Solutions,


When u ll use Record Button in QTP?Is VB script is Mandatory in QTP? What is Meaning of Frame("v1")?

1 Answers   TCS,


what kind of erros can be handled with the using QTP?

2 Answers   CTS, Satyam,


What the differences are and best practical application of each.

1 Answers  


how we connect oracle or sql data server database to qtp

3 Answers   Tanla Solutions,


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?

0 Answers  


What information do the columns in the Keyword View show for each step?

1 Answers  


Categories