ArrayResize

Resets an array to a specified minimum number of elements. This can improve performance, if used to size an array to its expected maximum. For more than 500 elements, use ArrayResize immediately after using the ArrayNew tag.

Returns: boolean

Usage

ArrayResize( array, minimum_size )

Arguments

Argument Description
array
(array, required)

Name of an array

minimum_size
(number, required)

minimum size of the array

Examples

Sets a minimum number of array items for an array

Fills the unset array items with null

numbers = [ 1, 2, 3, 4 ];

arrayResize(numbers,10);
Dump( numbers ); 

//member function
numbers.resize(15);
Dump( numbers );

See also