Option Explicit and variable declarations

Results 1 to 2 of 2

Thread: Option Explicit and variable declarations

  1. #1
    Ezequiel Guest

    Default Option Explicit and variable declarations

    Hello!<BR><BR>I was wondering if the use of Option Explicit does have any performance issues.<BR>I&#039ve read on a mailing list that it is convenient to strip out Option Explicit for release versions of applications, since the server has to do some extra work with it.<BR>I also would like to know if the declaration of variables with the use of the Dim keyword does take any server resources. I mean if it hase sense to declare a variable that later isn&#039t used because the codeflow went on a different way.

  2. #2
    Matt Salmon Guest

    Default RE: Option Explicit and variable declarations

    As far as I know, the performance affects of using Option Explicit and forcing the dimming of all variables doesnt have any significant performance issues. The only advantage that it has is that it helps while coding to debug spelling errors when using variables. ASP variables are discarded when the script (i.e. the ASP page) comes to an end. Personally, I think it is good practice to keep as many variables as possible to a sub/function level...these are only used inside that function and result in easy to read and efficient code.

Posting Permissions

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