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

Answer Posted / ritesh mahendrakar

You can declare variables with the Dim, Public or the
Private statement. Like this:

Dim myname
myname = "ritesh"

However, this method is not a good practice, because you
can misspell the variable name later in your script, and
that can cause strange results when your script is running.

If you misspell for example the "myname" variable
to "mynime", the script will automatically create a new
variable called "mynime". To prevent your script from doing
this, you can use the 'Option Explicit' statement. This
statement forces you to declare all your variables with the
dim, public or private statement.

Put the Option Explicit statement on the top of your
script. Like this:

Option Explicit
Dim myname
myname = "ritesh"

Is This Answer Correct ?    62 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career

1930


how to find that tools work well with ur existing system?

1354


can test automation improve test effectiveness?

1486


What is the difference between run time object and test object in QTP?

566


Can anyone share/send me QTP 8.2 Crack as I had it before but now it's virus affected. Pls send me on Sawale.vijay@gmail.com Thanks, ~Vijay

2665






what is ODC and GDC?

7353


Which advantages helping QTP to hold the position of "Market Leader" for such a long period?

1389


Hi, how can we check or avoid the memory leakage in QTP9.2?

1703


can any one please tell me which is the best institute in Bangalore to learn QA (crash course)? Thanks

1527


Explain different recording modes?

585


Explain the concept of how quicktest professional (qtp) identifies object?

577


What is qtpro?

597


Which environments are supported by hp qtp?

598


How to call a test from another test?

682


How may types of defects identify application or your currently working application?pls give me answer..

1517