206 Chapter 5
Storing and Retrieving Test Results
Using Arrays to Store Test Results
Using Arrays to Store Test Results
Data types can be stored in two ways:
n Scalar values (that is, a single number such as 9 or (32, @10))
-OR-
n Arrays from 1 to 10 dimensions.
Note The overview of VEE data types is described in Chapter 4, “Analyzing and
Displaying Test Data.”
Indexing for arrays is zero-based in VEE, and brackets are used to indicate
the position of the array element. For example, if the array
A holds the
elements [
4, 5, 6], then
A[0] = 4, A[1] = 5, and A[2] = 6
The syntax for arrays is as follows:
The syntax to access elements of an array can be used in the
Formula
object or any expression field, such as those in the To/From File object.
colon Used to indicate a range of elements. For instance,
A[0:2] = [4, 5, 6] in the array above.
asterisk (*) a wildcard to specify all elements from a particular array
dimension.
A[*] returns all elements of array A.
commas In the subarray syntax, commas are used to separate array
dimensions. If
B is a two-dimensional array with three
elements in each dimension,
B[1,0] returns the first
element in the second row of
B.