I've been having success using new with arrays that have a single element:
Field Scrambled:Int[]
Scrambled = New Int[WordsToDescramble]
But I can't for the life of me figure out how to use New with an array of errays!
Field Scrambled_Dest:Int[][]
None of the following work:
Scrambled_Dest = New Int[WordsToDescramble]
Scrambled_Dest = New Int[WordsToDescramble][]
Scrambled_Dest = New Int[WordsToDescramble][0]
Scrambled_Dest = New Int[WordsToDescramble]Int[]
Scrambled_Dest[] = New Int[WordsToDescramble]
Scrambled_Dest[] = New Int[WordsToDescramble][]
I want the first array to be resized to WordsToDescramble, and the second set of arrays to be resized like so:
For Loop = 0 To WordsToDescramble-1
Scrambled_Dest[Loop] = New Int[Len(Scrambled$[Loop])]
Next
So each has the same number of elements as the string in question has letters.
However, I don't know if even that part works since I can't get the first bit to work!
I saw some stuff about slices that does array of array resizing, but I wanted to use New because it will clear the arrays and the code would be cleaner.
Field Scrambled:Int[]
Scrambled = New Int[WordsToDescramble]
But I can't for the life of me figure out how to use New with an array of errays!
Field Scrambled_Dest:Int[][]
None of the following work:
Scrambled_Dest = New Int[WordsToDescramble]
Scrambled_Dest = New Int[WordsToDescramble][]
Scrambled_Dest = New Int[WordsToDescramble][0]
Scrambled_Dest = New Int[WordsToDescramble]Int[]
Scrambled_Dest[] = New Int[WordsToDescramble]
Scrambled_Dest[] = New Int[WordsToDescramble][]
I want the first array to be resized to WordsToDescramble, and the second set of arrays to be resized like so:
For Loop = 0 To WordsToDescramble-1
Scrambled_Dest[Loop] = New Int[Len(Scrambled$[Loop])]
Next
So each has the same number of elements as the string in question has letters.
However, I don't know if even that part works since I can't get the first bit to work!
I saw some stuff about slices that does array of array resizing, but I wanted to use New because it will clear the arrays and the code would be cleaner.