Two-Dimensional Arrays
61
Axcess Programming Language
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
Страница 1: ...instruction manual Software Axcess Programming Language ...
Страница 8: ...vi Axcess Programming Language Table of Contents ...
Страница 12: ...Introduction 4 Axcess Programming Language ...
Страница 22: ...Axcess Basics 14 Axcess Programming Language ...
Страница 38: ...Channel Characteristics 30 Axcess Programming Language ...
Страница 54: ...Levels 46 Axcess Programming Language ...
Страница 62: ...Operators 54 Axcess Programming Language ...
Страница 66: ...Variable Types and Conversions 58 Axcess Programming Language ...
Страница 70: ...Two Dimensional Arrays 62 Axcess Programming Language ...
Страница 80: ...While Keywords 72 Axcess Programming Language ...
Страница 86: ...Using Buffers 78 Axcess Programming Language ...
Страница 94: ...Waits and Timer Keywords 86 Axcess Programming Language ...
Страница 102: ...Using Subroutines 94 Axcess Programming Language ...
Страница 108: ...Include Files and System_Calls 100 Axcess Programming Language ...
Страница 120: ...Compiler Error Messages 112 Axcess Programming Language ...
Страница 124: ...The External_Control Protocol 116 Axcess Programming Language ...
Страница 143: ...Index 135 Axcess Programming Language ...