Hello,
Ok... I'm not too sure how many people will read this, or how many people it will help, but here it is anyway...
Ever wanted a good explination of array's? Ever wanted to know how they work? Don't think the Help Files are descriptive enough? Well, you've come to the right place!!
I don't think I've ever used an array and if I have then I don't know what it is. That's one thing that the Help Files don't really explain that well.
Ok..
An Array can basically be seen as a fileing cabinet.
Lets say in this fileing cabinet you had two draws, as an array that would represent;
Dim myarray(2)
Note: ( The Dim command just sets the array, you only ever use it once )\
Now lets say that in each draw, you had 5 folders, then the array would be;
Dim myarray(2,5)
Note: ( The 2 is the amount of draws, and the 5 is the amount of folders )
Then, lets say that each folder has in it another 3 folders, the array would now be;
Dim myarray(2,5,3)
And so on...
Ok I get that, But how do I access the array?
Let's say you wanted to acces the 2nd subfolder of the 4th folder in the first draw ( That's the same as going, ok, open the first draw, look for the 4th folder, now i want the 2nd subfolder )
To access that you use
variable = myarray(1,4,2)
Note: I didn't use the Dim command, because i am not setting the array, just accessing it's values
So, what does that help when I'm programming?
Well, ok, now that you have each draw, and each draw has the four folders, and each of these folders has the three subfolders...
Think about how many sub folders there is all up, that's 3 for each folder, so there's 4 folders in the first draw, that means there's 3 x 4 subfolders in that draw, that's 12 subfolders in the first draw, and the same in the second draw, that gives you 24 subfolders all up.
Tt's much easier to have all of that set up in the fileing cabinet rather than having them all spread out on the floor ( ie, all in seperat variables ), isn't it?
Ah, I see
That's the benifit of array's
So much better than having all these other variables floating around when all you need is a single array.
Hope I Helped anyone in need of an explanation of array's.
Jess.

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy