What is the syntax to reset an array?

Erase <array name>
‘for fixed numeric arrays – all elements set to 0
‘for fixed string arrays – all elements set to “”
‘for arrays of objects – all elements set to Nothing
‘for dynamic arrays – frees memory
‘example
Dim NumArray(2) As Integer
Erase NumArray

 

Advertisements