Please enable JavaScript to view this site.

ESL Documentation

Arrays are resizable in the first dimension only. The resize statement lets you initially define an array with one range of subscripts, and then later make it larger or smaller. If the resize enlarges the array, existing data is not disturbed, but if it decreases the array size, some array space will be dropped and the corresponding data will be lost.

When you increase the size of an array, additional memory is used. The resize statement in the Reference Guide shows some common sizes of arrays.

 

In the following example, the resize statement is used to increase the size of the array by 5 every time the action is called.

 

action RedimensionArray is

    copy (5+ObjectLimit) to ObjectLimit

    resize array ObjectChildren to ObjectLimit

 

Note that only the first dimension (the number of objects, initially

"1 thru ObjectLimit") is increased (from 10 to 15, the first time the action is invoked), and that each object still can have only three values.