|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Jscript/wsh const variables
hi!
does anyone know why wsh says this code wont compile? const daysInWeek : int = 7; thanks! joey |
|
#2
|
||||
|
||||
|
This code execution results in an 800A03EA error. This is a general syntax error that is usually caused by an incorrect character or an omission. Typically, this is dues to a missing ampersand or forward slash. However, that's not the case here, since this is valid Jscript 8.0 syntax.
I'm quessing your are trying to run the sample code found here. Am I right? The latest WSH engines only support Jscript 5.6. Version 8.0 is released as a part of Visual Studio if I'm not mistaken. Personally, I prefer VBS over JS anyway. Unfortunately, I can't tell you how far back this syntax is supported. As a workaround, why not just declare a global variable instead of a constant. |
|
#3
|
|||
|
|||
|
hi!
thx. well, as a workaround, i just declared a global var. ms have this jscript.net, this versions supports constants.. thx for confirming my suspicion. good day! joey |
|
#4
|
||||
|
||||
|
Sure. I'm sure someone is googling for this as we speak.
|
![]() |
| Viewing: ASP Free Forums > System Administration > Windows Scripting > Jscript/wsh const variables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|