int ArrayResize(object array[ ], int new_size)
Sets a new size for the first dimension. If executed successfully, it returns
count of all elements contained in the array after resizing, otherwise,
returns -1, and array is not resized.
最初の次元の新しいサイズを設定します。もし、正常に実行されれば、配列のサイズを変更した後、含まれるすべての要素の数を返します。それ以外の場合は、-1
を返し、配列はサイズ変更されません。
Note: Array declared at a local level in a function and resized will remain
unchanged after the function has completed its operation. After the function
has been recalled, such array will have a size differing from the declared
one.
注意: 関数内のローカルレベルで宣言された配列のサイズ変更は、関数がその処理を完了した後も、変更されないままの状態です。関数が呼び出し直された後、このような配列は宣言された時と違う大きさになります。
Parameters:
パラメータ:
array[] - Array to resize.
サイズを変更する配列。
new_size - New size for the first dimension.
最初の次元の新しいサイズ。
Sample:
サンプル:
double array1[][4];
int element_count=ArrayResize(array1, 20);
// new size - 80 elements
|