[thelist] VBscript array declaration puzzlement

Joshua Olson joshua at waetech.com
Wed Sep 15 13:37:02 CDT 2004

> -----Original Message-----
> From: Joel D Canfield
> Sent: Wednesday, September 15, 2004 2:03 PM
> Why does this
>     Dim aryPlanIDs(intCount)
> result in an 'expected constant' error, while
>     Dim aryPlanIDs()
>     ReDim aryPlanIDs(intCount)
> seems to work fine?


I agree that it's screwy, but VBScript doesn't allow variables when
declaring array size with the Dim statement.  I'm sure under the hood there
is a reason, but it eludes me.  FWIW, I find that array management is much
easier in JScript.

Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list