Open System Testing Architecture

TOC PREV NEXT INDEX



Variable Arrays

Character and integer variables declared within the Definitions section of a script may be defined as arrays. SCL supports arrays of up to three dimensions. There is no defined limit to the number of elements which may be declared in an array dimension.

If an array of two or three dimensions is specified, each dimension must be separated from the following dimension by a comma. When an array is referenced, array subscripts must be specified for each of its dimensions.

The numbering of the array elements is dependent on how the array was declared. SCL supports both start and end array subscript values within the array declaration itself. For example:

 CHARACTER*9     MONTHS [1:12]
 CHARACTER*9     MONTHS [12]

Both of these variable declarations declare an array of character variables each with 12 elements. The elements in the array are both numbered 1 to 12. Compare them with the following example:

 CHARACTER*9     MONTHS [0:11]

This example also declares an array of 12 elements, but the array elements are numbered from 0 to 11.

Only positive values can be specified for the start and end array subscript values, and the start value must be less than or equal to the end value. If the start value is omitted, it defaults to 1.

When you want to retrieve a value from an array variable, you can use numeric literals, integer variables or complex arithmetic expressions to specify the element(s). For example:

 SET Tax = Revenue [Office, Index + 1] * 0.175

See also:

The DEFINITIONS Section


OpenSTA.org
Mailing Lists
Further enquiries
Documentation feedback
CYRANO.com
TOC PREV NEXT INDEX