title: VBScript create an array in function based on parameter
body: <p>Good Day,</p>
  
  <p>I'm creating a VBScript function to return an array.  But I want to pass in a parameter for the array size.</p>
  
  <pre><code>Function CreateArray(arraySize)
      Dim someArray(arraySize)               ' EXPECTED INTEGER CONSTANT
      For i = 0 to UBound(someArray)
          someArray(i) = 5
      Next
  
     CreateArray = someArray
  End Function
  </code></pre>
  
  <p>But I'm getting an error:</p>
  
  <p>Expected integer constant</p>
  
  <p>Is this possible to do in VBScript?</p>
  
  <p>TIA,</p>
  
  <p>coson</p>