[thelist] VBscript array declaration puzzlement

Anthony Baratta Anthony at Baratta.com
Wed Sep 15 13:43:43 CDT 2004


At 11:03 AM 9/15/2004, Joel D Canfield wrote:
>Why does this
>
>     Dim aryPlanIDs(intCount)
>
>result in an 'expected constant' error, while
>
>     Dim aryPlanIDs()
>     ReDim aryPlanIDs(intCount)
>
>seems to work fine?

Because VBS is brain dead. ;-) VBS does not allow the initial declaration 
of an array to use a variable. Sucks. One reason I use Dictionary Objects 
when I can.

-- 
Anthony Baratta

"Some days it's just not worth chewing through
  the leather straps to get up in the morning."
  - Emo Phillips



More information about the thelist mailing list