Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can you dimension an array with a variable value?

LEGEND ,
Aug 09, 2006 Aug 09, 2006
I would like to dimension an array with a variable value, like in the
example of the two dimensional array below:

dim FrequencyArray(FrequencyCount,3)

But I get the error message "Expected integer constant" when I try it. Is
there a trick to doing this?


TOPICS
Server side applications
253
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 09, 2006 Aug 09, 2006
http://www.4guysfromrolla.com/webtech/102898-1.shtml

HTH,

Jon

"Mike Z" <mikeyz@rocktmail.com> wrote in message
news:ebcu9v$jfq$1@forums.macromedia.com...
>I would like to dimension an array with a variable value, like in the
>example of the two dimensional array below:
>
> dim FrequencyArray(FrequencyCount,3)
>
> But I get the error message "Expected integer constant" when I try it. Is
> there a trick to doing this?
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 09, 2006 Aug 09, 2006
LATEST
I found out the workaround, you declare it and then redimension it with the
variable value:

Dim FrequencyArray()
Redim FrequencyArray(FrequencyCount,3)


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines