You can't. You could probably use data statements and a loop to do it though. I hate using data statements though. And they may not even be supported by Blitzmax for all I know... I think Blitzmax has no goto or labels?
"This poses a problem as the array will need to have about 20 of the 27's (but this could go up to 30 if i wanted it to work perfectly).
There is a good reason because i want to store words in it and to do so i have each part of the array = a letter so 1 is A, 2 is B etc (With 0 being no letter) and then the last bit store certain details about the word."
I see what you are trying to do. You're trying to access the array by putting the word in. Like this:
Dictionary(Chr("A"), Chr("P"), Chr("P"), Chr("L"), Chr("E"), 0, 0, 0, 0, 0)
But if you were able to do that, you would need enough memory to hold every single possible combination of letters in the english language. There is no way you can do that with the amount of ram computers currently have, or will have in the foreseeable future.
If you want to store words in a way which is easily retriveable, then there are better ways to to it.
I'm thinking you'll need to use multiple arrays indexing one another. And you might have to limit yourself to storing the index of words that start with a particular letter, and how many words are in that list. Then from there you might be able to do the same for the second letter, but from the third on, you may have to simply do a standard search through the remaining words which should not be that many.
Ie:
If your word list is
APPLE
ABACUS
APRICOT
PENCIL
ZEBRA
Then you would store that the A words start at index 0, and that the AB words start at index 1. You could use a two dimensional array for this: Dim Index(27, 27) Heck, you could go in 5 letters if you wanted to waste 57 megs of ram... Four might be more realistic.
I'm thinking there's gotta be a better way though.
"This poses a problem as the array will need to have about 20 of the 27's (but this could go up to 30 if i wanted it to work perfectly).
There is a good reason because i want to store words in it and to do so i have each part of the array = a letter so 1 is A, 2 is B etc (With 0 being no letter) and then the last bit store certain details about the word."
I see what you are trying to do. You're trying to access the array by putting the word in. Like this:
Dictionary(Chr("A"), Chr("P"), Chr("P"), Chr("L"), Chr("E"), 0, 0, 0, 0, 0)
But if you were able to do that, you would need enough memory to hold every single possible combination of letters in the english language. There is no way you can do that with the amount of ram computers currently have, or will have in the foreseeable future.
If you want to store words in a way which is easily retriveable, then there are better ways to to it.
I'm thinking you'll need to use multiple arrays indexing one another. And you might have to limit yourself to storing the index of words that start with a particular letter, and how many words are in that list. Then from there you might be able to do the same for the second letter, but from the third on, you may have to simply do a standard search through the remaining words which should not be that many.
Ie:
If your word list is
APPLE
ABACUS
APRICOT
PENCIL
ZEBRA
Then you would store that the A words start at index 0, and that the AB words start at index 1. You could use a two dimensional array for this: Dim Index(27, 27) Heck, you could go in 5 letters if you wanted to waste 57 megs of ram... Four might be more realistic.
I'm thinking there's gotta be a better way though.