Arrays and Const problems. :(

Results 1 to 2 of 2

Thread: Arrays and Const problems. :(

  1. #1
    Join Date
    Dec 1969

    Default Arrays and Const problems. :(

    Hi there, <BR><BR>In my code I have:<BR><BR>Const NUM_OF_ATTACHMENT_FIELDS = 3<BR><BR>and then a bit further I have the following array defined:<BR><BR>Dim TempUploadedFiles(NUM_OF_ATTACHMENT_FIELDS)<BR><BR >However, this doesn&#039;t work, because I keep receiving the error:<BR><BR>Expected integer constant<BR>/cgi-bin/email/asp/email_advanced.asp, line 437, column 22<BR>Dim TempUploadedFiles(NUM_OF_ATTACHMENT_FIELDS)<BR><BR >HOw do I initialize an ARRAY to a set size determined by a Const?<BR><BR>Thanks!<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Arrays and Const problems. :(

    Yeah, you can&#039;t intially dim an array with a variable or a constant.<BR><BR>Do this instead:<BR><BR>Dim myArray<BR>ReDim myArray(NUM_OF_ATTACHMENT_FIELDS)<BR><BR>Dunno why?

Posting Permissions

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