Home  >  Article  >  What are the characteristics of arrays

What are the characteristics of arrays

hzc
hzcOriginal
2020-06-24 11:51:1714522browse

What are the characteristics of arrays

The so-called array is an ordered sequence of elements. If a limited collection of variables of the same type is named, then the name is the array name. The individual variables that make up an array are called components of the array, also called elements of the array, and sometimes called subscript variables. The numeric number used to distinguish the individual elements of an array is called a subscript. In programming, an array is a form of organizing several elements of the same type in an orderly manner for the convenience of processing. These ordered collections of similar data elements are called arrays.

Array is a collection used to store multiple data of the same type

Features

  1. 1 .An array is a collection of elements of the same data type.

  2. 2. The elements in the array are stored in order, and they are stored continuously in the memory in this order.

  3. 3. The array element is represented by the name of the entire array and its sequential position in the array. For example, a[0] represents the first element in the array named a, a[1] represents the second element of the array a, and so on.

For VB arrays, when expressing array elements, you should pay attention to:

  1. 1 The subscript should follow immediately after the array name, and use a circle enclosed in parentheses (no other parentheses are allowed).

  2. 2 The subscript can be a constant, variable, or expression, but its value must be an integer (if it is a decimal, it will be rounded to an integer).

  3. 3 The subscript must be a continuous integer, its minimum value becomes the lower bound, and its maximum value becomes the upper bound. The lower bound value defaults to 1 when not specified.

The above is the detailed content of What are the characteristics of arrays. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn