Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Max Array Size

Status
Not open for further replies.

kencat742

Programmer
Jun 30, 2005
23
US
What is the max size an array can be? I have an array where the elements are only in every i-th spot so I am wondering at what point this will cause problems.

Thanks

You've heard about the computer programmer that died while washing his hair in the shower. The instructions said, 'Lather, rinse, repeat.'
 
Straight outta VB help (a great feature to check out!):
Setting Upper and Lower Bounds
When declaring an array, follow the array name by the upper bound in parentheses. The upper bound cannot exceed the range of a Long data type (-2,147,483,648 to 2,147,483,647).


The Microsoft mascot is a butterfly.
A butterfly is a bug.
Think about it....
 
Thanks, thats big enough I shouldn't have a problem. :)

the VB help on my computer doesn't work

You've heard about the computer programmer that died while washing his hair in the shower. The instructions said, 'Lather, rinse, repeat.'
 
If only every i-th position is actually containing data, leaving the rest of the array unused, then would a Collection or a Dictionary not be more appropriate?

Greetings,
Rick
 
It's certainly worthwhile to re-install MSDN, preferably the April 2001 version if you plan on doing any VB6 work. Failing that your reference work should be:

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
 
Yes, VB6 doesn't support sparse arrays.

Don't forget to calculate the memory consumption of all those empty cells.

A dictionary, collection, or even a linked-list would be a better implementation.

Chip H.


____________________________________________________________________
Donate to Katrina relief:
If you want to get the best response to a question, please read FAQ222-2244 first
 
Try this technique.

Substitute recordset to array

faq222-6134
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top