Extensions |
void array:resize ( number i1, i2, ... in )
Resizes and/or changes the dimensionality of the array. The number of dimensions provided as parameters does not need to match the previous dimensionality of the array. The new size of the array will be product of the parameters.
The contents of the array (from a linear perspective) are not changed by a call to resize. That is, if an array is expanded, the existing contents will persist, but if an array is truncated, then the elements at the end will be lost. However, if any dimension size (after the first dimension) of a multi-dimensional array is changed, then the data will no longer be at their previous indexes.
Parameters
in | One or more dimension sizes |
Return Values
None.
Error Conditions
If there is not enough available memory in the system to satisfy the reqested size, this function will signal an error. The existing array will be left unchanged at its original size.
Example
Copyright 2010 Justin Aquadro