Saved Papers

Save papers so you can find them more easily...


Join Now

Get instant access to our database of over 100,000 papers.

Join Now!

Data Structures: VB And VBA Offer Two Options: Arrays And Collections


Join Now
Credit Card
Join Now
PayPal
 

This month is devoted to data structures. This isn't a computer science course, so let's define a data structure as a data holder--something that holds whatever data we need while our program executes. Visual BASIC and VBA use two basic data structures: the array and the collection. This month when I say VB, I also mean VBA.

ARRAYS

Most VB programmers are familiar with the array (figure 1). An array can be single or multidimensional, which means it can have rows and columns. While the array is the most commonly used data structure, it's not the best choice for at least two reasons. The first is data access. To find something within the array, you have to know exactly what you want. If you knew that, you wouldn't have to look, would you? To search for an item, you must iterate through the array.

[FIGURE 1 OMITTED]

The second reason is that the array must be dimensioned to a known limit. Once set, it's not easy to add an item after that limit is reached. For example, if......

Join Now or Login to view the rest of this paper.

Approximate Word Count: 826
Approximate Pages: 4 (260 words per double-spaced page)

Why should you join TermPapersMonthly?
- It's secure and completely anonymous.
- You get instant access to over 100,000 papers.
- Prompt and helpful customer support.

Credit Card
PayPal