Creating an array

Results 1 to 2 of 2

Thread: Creating an array

  1. #1
    Join Date
    Dec 1969

    Default Creating an array

    Hello!<BR><BR>I&#039m having a problem with an array.<BR>This is what i do:<BR><BR>Dim intValue<BR>intValue = 10<BR>Dim SomeArray(intValue)<BR><BR>This doesn&#039t work. I get an "Expected integer constant" error, refering to the &#039intValue&#039 variable.<BR>If I change it to this...<BR><BR>Dim SomeArray(10)<BR><BR> works ok.<BR><BR>Have you got a clue?<BR><BR>Thanks - Peter

  2. #2
    Join Date
    Dec 1969

    Default RE: Creating an array

    In VBScript you must use an integer constant to initially decalre an array size. You can get around this by doing the following:<BR><BR>Dim intValue<BR>Dim SomeArray()<BR>Redim SomeArray(intValue)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts