This line of code takes whatever value is in the sixth location of the third row in the two-
dimensional array NAMES, and assigns it to the variable VALUE. In the context of the previous
examples, VALUE will now contain an E.
Only the first index value is used when retrieving a whole row. The index value indicates the row to
be retrieved, and the length value for that row determines how many locations from the row are
actually retrieved. For instance:
ONE_NAME = NAMES[2]
After this line is executed, the array ONE_NAME will contain the string TROY AIKMAN, and its
length value will be 11. If you were to try to retrieve the entire first row, nothing would be returned
because its length value is Ø.
The third method of accessing a two-dimensional array is to assign it to another two-dimensional
array:
PEOPLE = NAMES
This will copy the entire contents of NAMES into PEOPLE, regardless of length values individual
rows. This method copies the entire contents of the two dimensional array, including length values
of the rows. PEOPLE[2] contains TROY AIKMAN and has a length value of 11, just like
NAMES[2].
In the original example, the two-dimensional array PEOPLE is defined with a size 8 by 20, and
NAMES is 10 by 30. When Axcess copies from a two-dimensional array into a smaller one, any
information outside the ranges of the smaller array is not copied.
Axcess Programming Language
Two-Dimensional Arrays
61
Need help?
Do you have a question about the AXCESS CONTROL SYSTEM PROGRAM and is the answer not in the manual?