469,631 Members | 1,218 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

weird asp page behavour with option expicit

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)
Sep 13 '05 #1
3 1532
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.
Sep 13 '05 #2
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in news:
#q**************@TK2MSFTNGP14.phx.gbl:
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.
Sep 13 '05 #3
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" <sm********@hotmail.com> a écrit dans le message de
news:Xn**********************************@207.46.2 48.16...
"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in news:
#q**************@TK2MSFTNGP14.phx.gbl:
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.

Sep 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by redneck_kiwi | last post: by
5 posts views Thread by Sönke Tesch | last post: by
6 posts views Thread by DBMonitor | last post: by
3 posts views Thread by Liam Gibbs | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.