473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

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 4247
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: David Hitillambeau | last post by:
Hi guys, As I am new to Python, i was wondering how to declare and use global variables. Suppose i have the following structure in the same module (same file): def foo: <instructions>...
1
by: Andr? Roberge | last post by:
I have the following two files: #--testexec.py-- def exec_code(co): try: exec co except: print "error" #-- test.py--
7
by: Lyn | last post by:
Hi and Season's Greetings to all. I have a question regarding the use of a qualifier word "Global". I cannot find any reference to this in Access help, nor in books or on the Internet. "Global"...
10
by: David P. Donahue | last post by:
When I wrote websites in VB .NET, I would often put functions in Global for all the pages to call. Now, in C#, doing so results in "references to non-static objects" and whatnot. I realize what...
22
by: fd123456 | last post by:
Hi Tom ! Sorry about the messy quoting, Google is playing tricks on me at the moment. > Global.asax is where you normally have the Global Application > and Session variables and code to...
9
by: CDMAPoster | last post by:
About a year ago there was a thread about the use of global variables in A97: http://groups.google.com/group/comp.databases.ms-access/browse_frm/thread/fedc837a5aeb6157 Best Practices by Kang...
3
by: User1014 | last post by:
A global variable is really just a property of the "Global Object", so what does that make a function defined in the global context? A method of the Global Object? ...
8
by: Rob T | last post by:
When I was using VS2003, I was able to compile my asp.net project locally on my machine and copy it to the production server and it would run just fine. I've now converted to VS2005. The project...
15
by: =?Utf-8?B?UGF0Qg==?= | last post by:
Just starting to move to ASP.NET 2.0 and having trouble with the Global.asax code file. In 1.1 I could have a code behind file for the global.asax file. This allow for shared variables of the...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.