VBscript parsing in IIS

A

AT

I have the ASP page

<%@ Language=VBScript %>
<%
Option Explicit

Response.End

A = b
%>

On some servers I get parsing error on some I don't
Error says that variable A is not defined.

This is understandable but the script is not even supposed to get to A = b
line
because of Response.end

So there is some setting somewhere responsible for parsing.

Any ideas? please share.

--
_________________________
Anatoli Trifonov
Software Developer & Consultant
Minds are like parachutes - they only function when open.
--Thomas Dewar
 
K

Kevin Parkinson

Anatoli:

At compile time, the VB compiler will tell you about the "A=b"
statement, because it's looking through the whole file( and you have Option
Explicit on ) for errors. At runtime it would skip "A=b" because of
response.end, but not at compile time.

Why not put
Dim A as String = b
0r
Dim A as String
A=b
...and save yourself the hassle?

Kevin Parkinson
 
A

AT

Try running this page with option Explicit and with response.End

Most probably it will not give error on your machine.

And then if you can explain me why I'd really appreciate it

--
_________________________
Anatoli Trifonov
Software Developer & Consultant
(415) 898-7300 x 404
Minds are like parachutes - they only function when open.
--Thomas Dewar
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top