You can resize several array variables in the same declaration statement , specifying the 可以在同一声明语句中调整多个数组变量的大小,同时为每个变量指定
The following code example initializes the array variables to default except for jagged arrays 下面的代码示例将数组变量初始化为默认值(交错数组除外) :
You can refer to the array as a whole by using just the array variable name without indexes 可以只通过使用数组变量名(没有索引) ,将数组作为一个整体引用。
It is possible to declare an array variable without initialization , but you must use the 可以声明一个数组变量但不将其初始化,但在将数组分配给此变量时必须使用
The following example declares an array variable to hold the number of students in each grade in a grammar school 下面的示例声明一个数组变量来存储初级学校每个年级的学生数。
Arrays also have built - in functionality for searching and sorting that can be accessed through the array variable 数组还有用于搜索和排序的内置功能,可以通过数组变量访问这些功能。
If you apply a modifier to an array variable instead of a single value variable , the modifier will be applied to every value in that array 如果你给数组变量应用单值变量的调节,结果是数组的每个值都被调节
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 您可以创建九个单独的字符串变量,每个队员一个,或者声明一个类似于以下代码的数组变量。
Arrays are used to store a series of related data items . this example demonstrates how to declare an array that stores names 数组变量是存储一系列相关联的数据项的(可以说,这些数据项都常是有内在联系的) 。下面的例子将告诉我们如何声明一个数组变量并且存储姓名。
You can do it by accessing internal appconfig : : state data or the array reference returned to you as the value of the array variable , but it is not recommended that you do so 可以通过访问内部的appconfig : : state数据或作为数组变量值返回给您的数组引用来实现这一步,但我们建议您不要这样做。