Английский язык в информационных технологиях. Демкина Л.М. - 46 стр.

UptoLike

Составители: 

48
You assign data to each of the elements of the array using an index into the array. Beginning
at zero and ending at 10, data can be assigned to the elements of an array as follows:
A(0) = 256
A(1) = 324
A(2) = 100
. . .
A(10) = 55
Similarly, the data can be retrieved from any element using an index into the particular array
element you want. For example:
. . .
SomeVariable = A(8)
. . .
Arrays aren't limited to a single dimension. You can have as many as 60 dimensions,
although most people can't comprehend more than three or four dimensions. Multiple
dimensions are declared by separating an array's size numbers in the parentheses with
commas. In the following example, the MyTable variable is a two-dimensional array
consisting of 6 rows and 11 columns:
Dim MyTable(5, 10)
In a two-dimensional array, the first number is always the number of rows; the second
number is the number of columns.
You can also declare an array whose size changes during the time your script is running.
This is called a dynamic array. The array is initially declared within a procedure using either
the Dim statement or using the ReDim statement. However, for a dynamic array, no size or
number of dimensions is placed inside the parentheses. For example:
Dim MyArray()
ReDim AnotherArray()
To use a dynamic array, you must subsequently use ReDim to determine the number of
dimensions and the size of each dmension. In the following example, ReDim sets the initial
size of the dynamic array to 25. A subsequent ReDim statement resizes the array to 30, but
uses the Preserve keyword to preserve the contents of the array as the resizing takes place.
ReDim MyArray(25)
. . .
ReDim Preserve MyArray(30)
There is no limit to the number of times you can resize a dynamic array, but you should know that
you make an array if smaller than it was, you lose the data in the eliminated elements.
4. Запомните следующие слова и письменно переведите тексты.
1. capital letters основные буквы;
2. confusion неразбериха;
3. constant константа, постоянная;
4. complex script сложный скрипт;
5. date literals литералы даты;
6. differentiating различие;
7. to define определять;
8. to eliminate устранять;
9. intrinsic constants существенные константы;
10. literal values буквенные значения;
11. meaningful значимый;
12. never changes никогда не изменяется;
13. prefix префикс, приставка;
14. to reassign переназначать;
15. sign знак.
   You assign data to each of the elements of the array using an index into the array. Beginning
   at zero and ending at 10, data can be assigned to the elements of an array as follows:
           A(0) = 256
           A(1) = 324
           A(2) = 100
           ...
           A(10) = 55
   Similarly, the data can be retrieved from any element using an index into the particular array
   element you want. For example:
           ...
           SomeVariable = A(8)
           ...

   Arrays aren't limited to a single dimension. You can have as many as 60 dimensions,
   although most people can't comprehend more than three or four dimensions. Multiple
   dimensions are declared by separating an array's size numbers in the parentheses with
   commas. In the following example, the MyTable variable is a two-dimensional array
   consisting of 6 rows and 11 columns:
           Dim MyTable(5, 10)
   In a two-dimensional array, the first number is always the number of rows; the second
   number is the number of columns.
   You can also declare an array whose size changes during the time your script is running.
   This is called a dynamic array. The array is initially declared within a procedure using either
   the Dim statement or using the ReDim statement. However, for a dynamic array, no size or
   number of dimensions is placed inside the parentheses. For example:
           Dim MyArray()
           ReDim AnotherArray()
   To use a dynamic array, you must subsequently use ReDim to determine the number of
   dimensions and the size of each dmension. In the following example, ReDim sets the initial
   size of the dynamic array to 25. A subsequent ReDim statement resizes the array to 30, but
   uses the Preserve keyword to preserve the contents of the array as the resizing takes place.
           ReDim MyArray(25)
           ...
           ReDim Preserve MyArray(30)
   There is no limit to the number of times you can resize a dynamic array, but you should know that
   you make an array if smaller than it was, you lose the data in the eliminated elements.
4. Запомните следующие слова и письменно переведите тексты.
    1. capital letters – основные буквы;
    2. confusion – неразбериха;
    3. constant – константа, постоянная;
    4. complex script – сложный скрипт;
    5. date literals – литералы даты;
    6. differentiating – различие;
    7. to define – определять;
    8. to eliminate – устранять;
    9. intrinsic constants – существенные константы;
    10. literal values – буквенные значения;
    11. meaningful – значимый;
    12. never changes – никогда не изменяется;
    13. prefix – префикс, приставка;
    14. to reassign – переназначать;
    15. sign – знак.

                                                 48