Tech Tip: Several ways to clean up arrays
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: December 5, 2005
It is good programming practice to clean up arrays after they are no longer needed. In 4D, here are a number of simple ways to clear an array:
- Manually delete each element in the array
DELETE ELEMENT(myArray;1; Size of Array(myArray) )
- Initialize the array to zero elements
ARRAY TEXT(myTextArray;0)
- You can also clear the array by using CLEAR VARIABLE(myArray) if you don't need it defined in interpreted mode any longer.