option explicit

Results 1 to 3 of 3

Thread: option explicit

  1. #1
    cwhisperer Guest

    Default option explicit

    I use option explicit in the beginning of my asp page. When I write some code the variables are not written the way I&#039ve declared with dim. they will not change to case sensitive.<BR>What is wrong

  2. #2
    Richard's Guest

    Default RE: option explicit

    You have to be more explicit....Maybe check the tags... put it within &#060;% %&#062;.

  3. #3
    Join Date
    Dec 1969

    Default VBScript Laguage Reference Entry

    Microsoft® Visual Basic® Scripting Edition<BR>Option Explicit Statement Language Reference <BR>Version 1 <BR> <BR>Description<BR>Forces explicit declaration of all variables in a script. <BR>Syntax<BR>Option Explicit <BR>Remarks<BR>If used, the Option Explicit statement must appear in a script before any other statements.<BR>When you use the Option Explicit statement, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable name, an error occurs.<BR><BR>Tip Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear. <BR><BR>The following example illustrates use of the Option Explicit statement: <BR><BR>Option Explicit &#039 Force explicit variable declaration.<BR>Dim MyVar &#039 Declare variable.<BR>MyInt = 10 &#039 Undeclared variable generates error.<BR>MyVar = 10 &#039 Declared variable does not generate error.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts