Special Array Resize Parameters

<special array resize parameters>

──┬─<multidimensional array designator>─┬─ , ──<new size>── , ─────────►
  ├─<event array designator>────────────┤
  ├─<string array designator>───────────┤
  └─<structure block array row>─────────┘
►─ RETAIN ─────────────────────────────────────────────────────────────┤

In this form of RESIZE statement, the first parameter is an array whose elements do not have an array class. Events and strings are special classes of objects. A multidimensional array can be considered an array of arrays.

The RESIZE statement sets the size of the parameter array to the new size, unless the new size is less than the existing size, in which case the RESIZE statement is ignored and the warning message ATTEMPTED DOWNWARD RESIZE IGNORED is generated.

If the first parameter includes a subarray selector, the dimension corresponding to the first asterisk (*) is changed; otherwise, the first dimension of the designated array is changed. Whenever a higher-order dimension of an array is enlarged, new subarrays are created with the same dimensions as in the original ARRAY declaration. Any existing subarrays are unaffected by the resize operation. For example, given the declaration DOUBLE ARRAY A[1:2,0:5,-4:4] the statement RESIZE(A[1,*,*],8,RETAIN) increases the size of A[1,*,*] from 6 to 8 (new bound pair = 0:7). The statement causes array rows A[1,6,*] and A[1,7,*] to be established as one-dimensional double arrays of size 9, even if all existing rows of A had already been resized to some other size.

Multidimensional Array Designator

A multidimensional array designator is an array designator or a procedure reference array designator with dimensionality greater than one; that is, a multidimensional array name or procedure reference array identifier, optionally suffixed by a subarray selector with at least two asterisks (*).

If the array to be resized is specified by a multidimensional array designator, then the new subarrays have the same type as the original array; their contents are undefined.

Event Array Designator

If the array to be resized is specified by an event array designator, then enlarging the low-order dimension creates new events with the happened state equal to FALSE (not happened) and the available state equal to TRUE (available); existing elements are unaffected.

String Array Designator

If the array to be resized is specified by a string array designator, then enlarging the low-order dimension creates new empty strings; existing elements are unaffected.

Interlock Array Designator

If the array to be resized is specified by an interlock array designator, then enlarging the low-order dimension creates new interlocks with a state of FREE; existing elements are unaffected.