Information Technology Reference
In-Depth Information
7.3.1.7 Records
Records are purely logical containers and do not have a specific size. More shall be
said about records later when talking about such logical structures.
7.3.1.8 Arrays
Arrays are simply sequences of DVs that can have one or more dimensions (a one
dimensional array is just an ordered list of values). The dimensions of an array
are important properties and may be static (for example defined externally in the
RepInfo) or dynamic. If the dimensions are dynamic then there will be a DV in
the data file that will give the value of the dimension(s), i.e. an integer or a numer-
ical expression to calculate the dimensions from one or more DVs. Restrictions
may also exist on the dimensions, i.e. the maximum or minimum and also if
there are only fixed dimensions allowed (for example, fixed dimensions of 1, 3, 6
and 10).
Another important property of arrays is the ordering of the values, which allows
one to calculate where in the data file a particular indexed value is to be found.
Figure 7.7 shows a two dimensional array which can be stored in the data in one of
two ways - the first index “i” varies fastest in the data file followed by the second
index “j” (row order) and then the case is shown where the second index “j” varies
fastest in the data file followed by the first index “i” (column order). These two
methods of storing arrays are the most common, but any ordering may be used. For
example, the FORTRAN [ 34 ] programming language stores arrays of data with the
“i” index varying fastest while the C programming language stores arrays of data
with the “j” index varying fastest.
Fig. 7.7 Array ordering in
data
Search WWH ::




Custom Search