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

Explain the string concatenation function in vbscript?

737


i am having some basic knowledge in c and VB 6.0. i qtp i want to know how to write the codings. by recording it is generating lot of codings. for example i want to test the text box. senerio is text box should not accept alphabets if it accept alphabets we should return fail status if it get number we should return pass status. how to write coding in vb script please help me

2033


Anyone have qtp11.0 crack?

2603


Explain the adodb.stream class?

749


Write a Script for ATM in QTP

3590


In what way program "hello world" you can write in vbscript?

884


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

745


How will you get the natural logarithm of the given number in vbscript?

813


How to add actions in driver script to run those actions in QTP?

1722


hi i am trying for testing job for 3+ experience(fake) can u suggest me what type of projects i can keep in my resume and how much of knoeledge i should have abt that project.thnks in advance.urgt plz

2786


How to assign a date value to a variable?

783


What is the difference between function and procedure?

851


How will you get a subset of a array in vbscript?

768


Does VB/Win make standalone .EXE files?

3131


What is the use of the date function in the vbscript language?

778