What is the use of "Option Explicit"?

Answers were Sorted based on User's Feedback



What is the use of "Option Explicit"?..

Answer / sonal.pagare

You can force VBScript to require all variables to be
explicitly declared by including the statement Option
Explicit at the start of every script. Any variable that is
not explicitly declared will then generate an error.

Is This Answer Correct ?    5 Yes 0 No

What is the use of "Option Explicit"?..

Answer / bharathchandra m

"Option Explicit" statement is used to declare variables and
arrays on the top of the script.When this stmt in script ,QTP
can allows all variables used in that script without
returning any error.

For example: x= 10
y= 20
z= c*y
msgbox(z)
In the above code, by mistakenly typed as 'c' in the place
of 'x'. Bur QTP tool allows 'c' as a new variable without
returning error.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More VB Script Interview Questions

what do you mean .ota mobile format

0 Answers  


What is the difference between vb debugger and the script debugger?

0 Answers  


Explain the constants in vbscript?

0 Answers  


How can you have different number of cells for each row of a table in HTML?

2 Answers  


Write a program to display the numbers in the below format using for loops? 1 2 3 4 5 6 7 8 9 10 11 12 and Write a program to display the numbers in the below format using for loops. 1 2 3 4 5 6 7 8 9 10

2 Answers  






how to write code: to check whether the window of an Application Under Test exist or not . plz give with example

2 Answers  


What are the differences between Visual Basic, VBA and VBScript? When would it be appropriate to use one as opposed to another?

1 Answers   Infosys,


what is diff between static and dynaic arrys?

0 Answers  


What is the use of option explicit statement?

0 Answers  


What are the valid scopes of a variable in vbscript?

0 Answers  


If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?

0 Answers  


Mention what is the main difference between function and sub-procedure?

0 Answers  


Categories