what is option explicit? what is the use of it?

Answer Posted / rajendra

In VB script

option explicit forces the user to declare every variable
used in the code.

In VB Script is not mandatory to declare the variables.

VB script will be processed by windows scripthost.

Some time script host maynot haddle the undiclared
variables.

so it is a good practice option explicit on the top of the
script code.

once if u declare "option explicit" the each any every
variable must be dicalred before using it in code.

other wise it fires an error nad not allow to run the
script on Windows script host.

It is good coding practice to use "option explicit" on the
top of the code.

byeee

Rajendra Prasad Reddy
rajendra_penumalli@yahoo.com
+919885162742
hyderabad
india

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between run time object and test object?

558


Qtp has been installed on my pc but recently ON opening it is giving this error PLEASE REPLY IT IS URGENT IT WAS WORKKING FINE QTPRO.EX THE instruction at "0x7.. ...". referenced memory at "0000....The memory could not be read... Awaiting QTP XPERTS REPly URGENT

2057


What is quick test pro? What is a quick test professional?

554


Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance

1539


Hi All, How to get repeated word in string . Thanks Balaji

942






if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

23933


To which environments does quicktest professional (qtp) supports?

592


Explain advantages and disadvantages of ddf?

601


What is 'sleep' in sync point?

628


in my application,validation message has in japanise language.how to validate this message is appears properly or not

1526


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1454


When to use descriptive programming?

594


Difference between action & Reusable action?

689


How to record application running on the Virtual machine?

644


we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?

1583