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

When inserting strings into a SQL table in ASP what is the risk and how can you prevent it?

1 Answers  


Explain the constants in vbscript?

0 Answers  


Explain about scrrun.dll in vbscript?

0 Answers  


how to validate the text in a web table

2 Answers   Mphasis,


What is the use of the instr function?

0 Answers  






what is the use of QCUtil? explain with one example?

1 Answers  


How will you convert a string to lower case string using vbscript?

0 Answers  


Which date function is used in the vbscript language to find the difference between the 2 dates?

0 Answers  


how to add the shared repository file to the script file while running the script manuall

2 Answers  


write a vb script code to display the vbscript word by word (i e 1st it should display v then b and up to t )

1 Answers  


Explain the adodb.stream class?

0 Answers  


can any body give the code to write the function for given suppose user login with usrer id and pwd to yahoomail.after cliking "sign in"if it is valid user id the next page will display userid'message box.( Note u have to use excel sheet to retrive the userid's data)

3 Answers   Bally Technologies,


Categories