Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

[RESOLVED] Dynamic array related question

$
0
0
Hi folks!

I know how to work with fixed arrays, but I would like to make it more clear and ask a question regarding fixed arrays. For example, what's the difference when declaring:

Code:

Dim str(0 to 100) as string
and

Code:

Dim str (100) as string
Is it just for specify the lower limit of the array or there is another explanation?

The main question is about Dynamic arrays. I usually work with Winsock and I never know the data arrival how many strings will provide. For example:

Code:

Dim str() as string
Then when doesn't know the dimension, how to allocate the actual number of elements with a ReDim statement??

Redim str(???) as string?? Or should i write the supposed value for it? That every time can exceed the limit?

:wave:Thanks in advance :)

Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>