07-17-2024, 01:12 PM
I agree with you Kernelpanic, it's got to be trying when it appears we are beating a dead horse, but I do have problems with understanding the nuances of what goes into making a word in a programming language work and ReDim is one which does have me scratching my head. As you say it works with ERASE, which seems to wipe out the existence of the array itself.
If its completely erased, then why would ReDim not also be able to resurrect a new name for the array?
I surmise, some part of the original array (ie the name) must be saved when when you use ReDim.
ERASE with a Dimmed array and that array is completely gone, name and all. Correct?
So the only other use for ReDim, if you are not using it to expand your array with _Preserve, would be to completely wipe out the data of the array and start again to fill the same array with the same number of elements. ( ie saving the name of the array and number of elements). Not sure if that is any more efficient than For x = 1 to 50:Array(x)=0:Next
If its completely erased, then why would ReDim not also be able to resurrect a new name for the array?
I surmise, some part of the original array (ie the name) must be saved when when you use ReDim.
ERASE with a Dimmed array and that array is completely gone, name and all. Correct?
So the only other use for ReDim, if you are not using it to expand your array with _Preserve, would be to completely wipe out the data of the array and start again to fill the same array with the same number of elements. ( ie saving the name of the array and number of elements). Not sure if that is any more efficient than For x = 1 to 50:Array(x)=0:Next