Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
REDIM takes more resources than DIM?
#10
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
Reply


Messages In This Thread
REDIM takes more resources than DIM? - by bplus - 07-17-2024, 12:21 AM
RE: REDIM takes more resources than DIM? - by Dimster - 07-17-2024, 01:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Preserving multi-dim arrays Pete 5 419 12-19-2025, 03:17 PM
Last Post: Dimster
  packaging resources tool TempodiBasic 6 587 09-22-2025, 11:16 PM
Last Post: TempodiBasic
  DIM AT -- feature request Jack 2 722 08-15-2023, 12:15 AM
Last Post: grymmjack
  REDIM, TYPE, and STRING Woes TerryRitchie 16 3,184 04-13-2023, 05:17 AM
Last Post: DSMan195276
  suggestion: initialize array values within the DIM statement bobalooie 19 3,388 12-22-2022, 06:46 PM
Last Post: Kernelpanic

Forum Jump:


Users browsing this thread: 1 Guest(s)