Where should I declare an array containing 500 objects?
我应该在哪里声明一个数组包含500个对象?
When you declare an array type, the size of the array is not specified.
当您建立一个数组类型时,数组的大小并不确定。
Once you declare an array variable, you cannot change its rank or its element data type.
宣告阵列变数后,就不可再变更其阵序或其元素资料型别。
You could create nine separate string variables, one for each player, or you could declare an array variable that looks something like the code below.
您可以创建九个单独的字符串变量,每个队员一个,或者声明一个类似于以下代码的数组变量。
To declare a variable as an array type, use $ declare -a myarray.
若要将某个变量声明为数组类型,可以使用 $declare-a myarray。
You declare and use an array of a reference type just as you would declare and use an array of any data type.
声明和使用引用类型的数组与声明和使用任何数据类型的数组并无不同。
There is a maximum number of dimensions you can declare for an array.
可为数组声明的维数有一个最大值。
There is a maximum number of dimensions you can declare for an array.
可为数组声明的维数有一个最大值。
应用推荐