How to make arguments optional in a function?

Answers were Sorted based on User's Feedback



How to make arguments optional in a function?..

Answer / ashwin

Ramya you are wrong.
We can make arguments optional by writing it as two square
brackets [].
ex: Function Test(ival,sval,[<optional>])
'logic here
end function

Is This Answer Correct ?    3 Yes 0 No

How to make arguments optional in a function?..

Answer / ramyab.mca@gmail.com

Hai.....

this is not possible as default VBS doesn't support this.
Instead you can pass a blank scring and have a default
value if arguments r not required.

K,Byeee...
Thanks & Regards
B.Ramyasri

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More QTP Interview Questions

Is there any vbscript in QTP for Data Driven Test instead of using the option provided by QTP?

2 Answers  


How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?

6 Answers  


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

0 Answers   Autodesk, EDS, Wipro,


Hi I am from delhi, Now I can surely say that no institution of QTP here in Delhi After reading you people I want to get cry, from last six month I am trying to learn QTP, I have knowledge too but dont know VB Script. Now it appears that without learning QTP no one can learn complete QTP, I want to get a formal learning in QTP. Can you suggest me the best institution. and please let me know the charges and span of the course too. thanks in advance to you alkaa.dugaal@gmail.com

1 Answers  


How to use Regular Expressions in QTP? give an example.

10 Answers   ABC, Accenture, Ordain Solutions, SCL,






what is batch testing?

1 Answers  


how to load the *.vbs (or) test generating script in a new machine?

3 Answers   Ordain Solutions,


what is the use of Browser.sync()

2 Answers   NIIT,


how do find current links in webpage for ex: in yahoowebsite today mainpage is having 50 links and next day same page is having 60 links. if i run same programe it should display total links in webpage ?

4 Answers   CTS,


when i am running login page i got test run error? Please give me the script to handle run time exceptions. It's urgent for me.

4 Answers  


What is the difference between QTP and WinRunner? Why do you choose only QTP for automation among remaing tools like Rational robot and silk test? Write the VBscript for any functionality in your project ? What is the cost of QTP ? If you entered into yahoo mail with your valid user name then you will get FOR EXAMPLE , " welcome to krishna " on the top of inbo page , how can you test it in QTP? What type of testing you can do, when we gave you 5 screens and how can you test that application? What type of framework you are using in your company and explain it?

0 Answers   CTS,


which command u will use to access the application through descriptive programing?

7 Answers   Datamatics,


Categories