Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > global.asa

Reply
Thread Tools

global.asa

 
 
donald
Guest
Posts: n/a
 
      11-24-2003
hi guys,
i got a problem with my global.asa file.
it was working fine with win2000. when i try to access the web pages with xp
pro i get this error message -

>Error Type:
>Microsoft VBScript compilation (0x800A03F2)
>Expected identifier
>/dmk/liarsdice/global.asa, line 7, column 4
>dim const whosturn=0
>---^


its obviously finding the global file ok, but i cant figure out what the
identifier its expecting is. the line thats bringing up the error is the
first in a series of constants declared in the sub application_onstart
section of the global.asa file. is it something to do with xp? an i missing
something really obvious(again )

thanks
donald


 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      11-24-2003
donald wrote on 24 nov 2003 in microsoft.public.inetserver.asp.general:

>>dim const whosturn=0

>


Never heard of constants in VBscript.

try:

dim whosturn
whosturn = 0


Anyway the name "whosturn" seems to me a variable and not a constant value.


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      11-24-2003
You don't dim a constant. You either dim a variable or just define a
constant.

Dim whosturn
whosturn = 0
'or
Const WHOSTURN = 0

This is the same whether this is W2K or not.

Ray at work


"donald" <(E-Mail Removed)> wrote in message
news:bpt0gr$e29$(E-Mail Removed)...
> hi guys,
> i got a problem with my global.asa file.
> it was working fine with win2000. when i try to access the web pages with

xp
> pro i get this error message -
>
> >Error Type:
> >Microsoft VBScript compilation (0x800A03F2)
> >Expected identifier
> >/dmk/liarsdice/global.asa, line 7, column 4
> >dim const whosturn=0
> >---^

>
> its obviously finding the global file ok, but i cant figure out what the
> identifier its expecting is. the line thats bringing up the error is the
> first in a series of constants declared in the sub application_onstart
> section of the global.asa file. is it something to do with xp? an i

missing
> something really obvious(again )
>
> thanks
> donald
>
>



 
Reply With Quote
 
Foo Man Chew
Guest
Posts: n/a
 
      11-24-2003
> Never heard of constants in VBscript.

Sure, they're there.

CONST foo = "bar"


 
Reply With Quote
 
donald
Guest
Posts: n/a
 
      11-24-2003
this is driving me nuts. i can dim "some" variables in the asa file, but not
others. and i cant put then in as "dim const x=whatever", only as "dim x"
the same global.asa file was working fine under win2000. could id be
anything to do with me installing php?

> > Never heard of constants in VBscript.

>
> Sure, they're there.
>
> CONST foo = "bar"



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      11-25-2003
See my reply that was posted 10 minutes after your question.

Ray at work

"donald" <(E-Mail Removed)> wrote in message
news:bpu3l8$t42$(E-Mail Removed)...
> this is driving me nuts. i can dim "some" variables in the asa file, but

not
> others. and i cant put then in as "dim const x=whatever", only as "dim x"
> the same global.asa file was working fine under win2000. could id be
> anything to do with me installing php?
>
> > > Never heard of constants in VBscript.

> >
> > Sure, they're there.
> >
> > CONST foo = "bar"

>
>



 
Reply With Quote
 
donald
Guest
Posts: n/a
 
      11-25-2003
hi ray,
what reply? i dont see it? was it in this thread?

> See my reply that was posted 10 minutes after your question.
>
> Ray at work



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      11-25-2003
Yes, it was in this thread. Here it is again.


You don't dim a constant. You either dim a variable or just define a
constant.

Dim whosturn
whosturn = 0
'or
Const WHOSTURN = 0

This is the same whether this is W2K or not.

Ray at work


"donald" <(E-Mail Removed)> wrote in message
news:bq07tk$kp5$(E-Mail Removed)...
> hi ray,
> what reply? i dont see it? was it in this thread?
>
> > See my reply that was posted 10 minutes after your question.
> >
> > Ray at work

>
>



 
Reply With Quote
 
donald
Guest
Posts: n/a
 
      11-25-2003
cheers ray thats working )
well, at least sort of, its bringing up an error with just one of my
constants now (one called "call") but i figure thats probably cause its a
restricted word or something like that. i'll make a few changes to the code,
that'll sort it.
it was definately working with "dim const x = whatever" on win2000 though. i
tried it earlier today on another machine. no errors with the constant
called "call" either. strange....


> You don't dim a constant. You either dim a variable or just define a
> constant.
>
> Dim whosturn
> whosturn = 0
> 'or
> Const WHOSTURN = 0
>
> This is the same whether this is W2K or not.
>
> Ray at work
>
>
> "donald" <(E-Mail Removed)> wrote in message
> news:bq07tk$kp5$(E-Mail Removed)...
> > hi ray,
> > what reply? i dont see it? was it in this thread?
> >
> > > See my reply that was posted 10 minutes after your question.
> > >
> > > Ray at work

> >
> >

>
>



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      11-25-2003

"donald" <(E-Mail Removed)> wrote in message
news:bq0bmv$iao$(E-Mail Removed)...
> cheers ray thats working )
> well, at least sort of, its bringing up an error with just one of my
> constants now (one called "call") but i figure thats probably cause its a
> restricted word or something like that. i'll make a few changes to the

code,
> that'll sort it.


Yes, exactly, call is a reserved word. Call SubRoutine...

> it was definately working with "dim const x = whatever" on win2000 though.


I'll believe that when I see it.

> i
> tried it earlier today on another machine. no errors with the constant
> called "call" either. strange....


I'll also believe that when I see it. :]


Ray at work


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments