Hopefully a simple question

Results 1 to 2 of 2

Thread: Hopefully a simple question

  1. #1
    Reggie Guest

    Default Hopefully a simple question

    I never use "dim" to declare my variables. Is there any point in doing that or is it just to avoid sloppy code.

  2. #2
    Join Date
    Dec 1969

    Default RE: Hopefully a simple question

    One good reason. If you use Option Explicit on the top of your page, which forces you to declare your variables with Dim, then you won&#039t get funky results due to typos on the variables. <BR>With Option Explicit if you mistype the variable you&#039ll get a runtime error saying undeclared variable. Without Option Explicit you&#039ll get funky results, which makes debugging is about a 100 times harder.

Posting Permissions

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