Changes the number of elements in an array.
ArrayResize (aArray, iNewSize [, iDim])
Variable | Description |
---|---|
aArray | A variable containing the array to resize. inout ARRAY OF ANYTYPE. |
iNewSize | The new size of the array. INTEGER. |
iDim | Optional. The dimension of aArray to resize. If omitted, the default is 1. If the array is not multi-dimensional, this argument must be 1. INTEGER. |
Use ArrayResize to dynamically resize arrays. The call to ArrayResize modifies the array passed in as the first argument.
[ ] INTEGER aiTempPerDay[5][4] [-] testcase arrayresize_example () [-] aiTempPerDay = {...} [ ] {10,12, 8, 17} [ ] {-1, 0, 17, -9} [ ] {14, 1, 1, 0} [ ] {75, 32, 18, 103} [ ] {9, -7, -2, 3} [ ] //Resize array to change 2nd dimension from 4 to 8 [ ] ArrayResize (aiTempPerDay, 8, 2) [ ] ArrayResize (aiTempPerDay, 8, 2)