Please enable JavaScript to view this site.

A-Shell Development History

Runtime enhancement to support new .CLEAR ARY() options:

For traditional MAPped arrays, as well as for DIMX arrays without the AUTO_EXTEND attribute, .CLEAR ARY() simply clears the contents of the array without affecting its structure. This applies to both single and multi-dimensioned arrays. The end result is exactly equivalent to iterating through all of the array elements and setting each to null except that it is easier to code and faster to execute.
For DIMX arrays with the AUTO_EXTEND attribute, the extent of the first dimension of the array is reset to 0. This is similar to resizing the array to 0 using REDIMX except that the array remains defined and ready to receive new elements (via auto-extension). Note that for multi-dimensional arrays, dimensions beyond the first retain their original extents; this is necessary for re-using the array since only the first dimension is subject to auto-extension.