The purpose of an array is to store a collection of one type of data that aren't numerically related; i.e. your player's HP is unlikely to have any numerical relation to his Experience Points, they're both totally independent, so you need two variables to store them, and that's all an array is; a group of variables.
The advantage of an array is organisation; say we have an array called
store(20), imagine it as a filing cabinet with one draw and 21 folders with numbered tags 0-20 (don't forget about 0). We can put whatever we like in these "folders" (or "fields") and it will stay there until we change it or
UNDIM the array.
Because we are so organised it's really easy to get hold of our data, just call the array with the numbered field we want, e.g.
PRINT store(2), assigning values to our fields is just as easy:
x= store(5).
So instead of having 21 variables (don't forget 0) called something like store0,store1,store2,... (and having to hard code everything that uses any of them) we now have a nice orderly array that makes it so much simpler to find and edit the data we need.
But we've just been talking about a one dimensional array, you can have multiple dimensions.
Let's get rid of our boring
store array and make something more interesting like a map for our new project (the next big MMORPG perhaps?

).
To make a 2D map we'll need a 2D array (makes sense),
DIM map(7,7) creates our very own 8x8 map (you forgot about 0 didn't you). To visualise this; instead of folders think now of a grid, like one you'd see on errrm... a map! Each column and row is numbered and every square on the map contains data that we can reference using the column and row numbers, i.e.
map(0,4) would be on the first row, four columns accross.
Now where-ever our character goes we can find out what number is in that square by referencing the square at his position
map(playerx,playery). These numbers could be all sorts of things maybe different terrain types; e.g. 1=sand, 2=water, 3=grass.
PS you can call your arrays whatever you like just remember to dimension them before trying to use them.
Does that help?
The Universe has been erased by a mod because it was larger
than 240x80 pixels.