Wow I did not know that about erase in subs in main this works fine!
I've used erase quite a bit, guess it's always been with ones dim'd in main or shared from main. oh let's try that!
yes, no problem sharing from main!
@Bartok maybe that will work for you?
Code: (Select All)
Dim a(3)
a(1) = 1
Print a(1); "prints 1 with no error"
Erase a
Print a(1); "error! the array has been freed and erased in the SUB"
I've used erase quite a bit, guess it's always been with ones dim'd in main or shared from main. oh let's try that!
Code: (Select All)
Dim Shared a(3)
foo
Sub foo
a(1) = 1
Print a(1); "prints 1 with no error"
Erase a
Print a(1); "error! the array has been freed and erased in the SUB"
End Sub
@Bartok maybe that will work for you?
b = b + ...