weird asp page behavour with option expicit

Discussion in 'ASP General' started by s_m_b, Sep 13, 2005.

  1. s_m_b

    s_m_b Guest

    Anyone ever seen this before?
    A page that generates a calendar view, works just fine without 'option
    explicit' .
    Add this in, but have missed some dim statements out in error, so page
    should error .
    Instead of error, the un-dim-ed variables are ignored and their portions of
    the code simply are not used - behavour as though entire loops etc are
    commented out.
    As soon as I add their dim statements, the code executes fine.

    Is there a setting that could cause this, that I have un-knowingly switched
    on?
    (w2k/IIS5/ASP/VBscript)
     
    s_m_b, Sep 13, 2005
    #1
    1. Advertising

  2. s_m_b wrote:
    > Anyone ever seen this before?
    > A page that generates a calendar view, works just fine without 'option
    > explicit' .
    > Add this in, but have missed some dim statements out in error, so page
    > should error .
    > Instead of error, the un-dim-ed variables are ignored and their
    > portions of the code simply are not used - behavour as though entire
    > loops etc are commented out.
    > As soon as I add their dim statements, the code executes fine.
    >
    > Is there a setting that could cause this, that I have un-knowingly
    > switched on?
    > (w2k/IIS5/ASP/VBscript)


    How can we tell?
    Maybe you have on error resume next in your code somewhere ...
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Sep 13, 2005
    #2
    1. Advertising

  3. s_m_b

    s_m_b Guest

    "Bob Barrows [MVP]" <> wrote in news:
    #:

    > s_m_b wrote:
    >> Anyone ever seen this before?
    >> A page that generates a calendar view, works just fine without 'option
    >> explicit' .
    >> Add this in, but have missed some dim statements out in error, so page
    >> should error .
    >> Instead of error, the un-dim-ed variables are ignored and their
    >> portions of the code simply are not used - behavour as though entire
    >> loops etc are commented out.
    >> As soon as I add their dim statements, the code executes fine.
    >>
    >> Is there a setting that could cause this, that I have un-knowingly
    >> switched on?
    >> (w2k/IIS5/ASP/VBscript)

    >
    > How can we tell?
    > Maybe you have on error resume next in your code somewhere ...


    well, that's why I'm asking!

    NO, no 'on error'. When I put one in, I always catch it so as to know
    where the error is.
    If I put in a deliberate code error, its picked up.
    The behaviour is as though 'on error' is running on every possible line
    of code, with no instruction other than to resume.
     
    s_m_b, Sep 13, 2005
    #3
  4. s_m_b

    Patrice Guest

    So try some bare bone code to try to reproduce the problem (such as 1 loop
    with a defined variable and 1 loop with an undefined variable).
    It could be interesting to see if another compilation error than an
    undefined variable shows the same behavior...

    - If yes you have really something very strange going on (looks like
    compilattion errors are "turned off" don't remember but I believe ASP calls
    a page to display these, if this page is not found it could perhaps fails
    silently ???)
    - If not you likely have some other condition in your own production code
    that you don't find for now

    --
    Patrice

    "s_m_b" <> a écrit dans le message de
    news:Xns96D0B06ED11BEsmb2000nshotrmailcom@207.46.248.16...
    > "Bob Barrows [MVP]" <> wrote in news:
    > #:
    >
    > > s_m_b wrote:
    > >> Anyone ever seen this before?
    > >> A page that generates a calendar view, works just fine without 'option
    > >> explicit' .
    > >> Add this in, but have missed some dim statements out in error, so page
    > >> should error .
    > >> Instead of error, the un-dim-ed variables are ignored and their
    > >> portions of the code simply are not used - behavour as though entire
    > >> loops etc are commented out.
    > >> As soon as I add their dim statements, the code executes fine.
    > >>
    > >> Is there a setting that could cause this, that I have un-knowingly
    > >> switched on?
    > >> (w2k/IIS5/ASP/VBscript)

    > >
    > > How can we tell?
    > > Maybe you have on error resume next in your code somewhere ...

    >
    > well, that's why I'm asking!
    >
    > NO, no 'on error'. When I put one in, I always catch it so as to know
    > where the error is.
    > If I put in a deliberate code error, its picked up.
    > The behaviour is as though 'on error' is running on every possible line
    > of code, with no instruction other than to resume.
     
    Patrice, Sep 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Julien ROUZIERES

    g++ -pg option and -shared option

    Julien ROUZIERES, Dec 21, 2004, in forum: C++
    Replies:
    1
    Views:
    774
    GianGuz
    Dec 21, 2004
  2. richardd
    Replies:
    1
    Views:
    330
    Larry Bates
    Apr 7, 2004
  3. Kevin Blount

    page.aspx?option - how to detect "option"

    Kevin Blount, Nov 28, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    628
    =?Utf-8?B?RWVyYWo=?=
    Nov 28, 2006
  4. bli
    Replies:
    1
    Views:
    316
    Roger Upole
    Nov 10, 2006
  5. Replies:
    5
    Views:
    223
    Dominick Baier [DevelopMentor]
    Feb 9, 2006
Loading...

Share This Page