470,604 Members | 2,173 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

global.asa

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
Jul 19 '05 #1
9 4033
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)
Jul 19 '05 #2
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" <dm**@btinternet.com> wrote in message
news:bp**********@hercules.btinternet.com...
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

Jul 19 '05 #3
> Never heard of constants in VBscript.

Sure, they're there.

CONST foo = "bar"
Jul 19 '05 #4
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"

Jul 19 '05 #5
See my reply that was posted 10 minutes after your question.

Ray at work

"donald" <dm**@btinternet.com> wrote in message
news:bp**********@titan.btinternet.com...
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"


Jul 19 '05 #6
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

Jul 19 '05 #7
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" <dm**@btinternet.com> wrote in message
news:bq**********@hercules.btinternet.com...
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


Jul 19 '05 #8
cheers ray thats working :o)
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" <dm**@btinternet.com> wrote in message
news:bq**********@hercules.btinternet.com...
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



Jul 19 '05 #9

"donald" <dm**@btinternet.com> wrote in message
news:bq**********@sparta.btinternet.com...
cheers ray thats working :o)
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
Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by David Hitillambeau | last post: by
1 post views Thread by Andr? Roberge | last post: by
10 posts views Thread by David P. Donahue | last post: by
22 posts views Thread by fd123456 | last post: by
8 posts views Thread by Rob T | last post: by
15 posts views Thread by =?Utf-8?B?UGF0Qg==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.