how do you make the variable declaration mandatory?what is the use of "option explicit"?

Answer Posted / cnu_thatavarthi

Option Explicit
Dim strValue, strValue
strValue = 20
'Expected Error: Name(Variable) is redefined

Dim intA, intB
intC= intA+intB

'Expected Error: Name(Variable is undefined)

Note: If we can use Option Explicit we have To pass the all the variables And it Is indentify undefined And redefined
variables

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi all, i had a question, that how to find out hiding a coloumn in a table i had a table having the following column names NAME DESCRIPTION CREATED TIME CREATED USER if i right clicked on a NAME column it will displays a menu having the same column names in a list like NAME DESCRIPTION CREATED TIME CREATED USER with check boxes.if i unched any check box, that column name should not be appear in the main table column names could anyone please solve this problem?

1559


Explain the string concatenation function in vbscript?

546


We have 1 web page with names column. I am giving the Service Providers1,2,3.... @ that time dynamically some no of names are displaying in the webpage and The Pop up windows are opening(No.of Pop Up windows=No.of Names). The names may be diffar for each and every Service Provders (Dynamically) How can we handle the Dynamic values?

1757


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

566


How to Import data from a file (file is on the desktop) to the data table

1590






What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?

586


How to make sure that items in a wintree are sorted al?

2359


When to use function procedures and what are its characteristics?

558


Explain about scrrun.dll in vbscript?

661


How can the spaces from the string be removed?

596


How do you declare a variable in vbscript?

633


Explain about constants in vb script?

578


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

539


Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji

1249


Mention how you can call vbscript functions?

587