(02-21-2023, 06:45 PM)Kernelpanic Wrote:Quote:No!
But! You have misconceptions.
Dynamic Arrays: After running Erase on dynamic arrays, the array is no longer known. It does not exist anymore. That's exactly what your screenshot shows.
Redim includes both! Erase is first applied, then resized with Dim. QBasic, Page 188
Static: Add a Print to the first FOR loop and you'll see the values. After Erase, the array is reinitialized -> 0. Completely correct.
You can't run erase on a Dynamic array!
I erased the Static array and showed it still existed but all the values cleared.
Erase doesn't delete the array!
Update: well I guess Erase does delete a dynamic array because that's what it says in Wiki for ERASE. Seems like an extra step if you want to clear all values.
b = b + ...