weird asp page behavour with option expicit

S

s_m_b

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)
 
B

Bob Barrows [MVP]

s_m_b said:
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 ...
 
S

s_m_b

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.
 
P

Patrice

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top