02-22-2023, 09:32 AM
(This post was last modified: 02-22-2023, 09:40 AM by TempodiBasic.)
(02-21-2023, 11:13 PM)bplus Wrote: Hard to see how Erase "erases" an array if you can't reuse the name after Erase.
Code: (Select All)ReDim a(1 To 10, 1 To 10)
a(8, 8) = 8
Print a(8, 8)
Erase a
redim a(1 to 8) '<<< red lines
(8) = 64
print a(8)
End
Must be purely to save memory space.
Yes, you can use the same name of the ERASEd dynamic array at the condition that you do not change the number of dimensions of the array (monodimensional stays with monodimensional , bidimensional stays with bidimensional etc etc), so you can "REDIM a " array with the same 2 dimensions that it has at beginning., but you can change the range of dimensions (bottom-upper limits)
It is a pity that wiki has no example for ERASE!