[next] [previous] [contents]

  22.6 CDD/Repository Arrays
  CDD/Repository supports the following arrays:

  .
        Multidimensional arrays (the ARRAY clause)
  .
        One-dimensional, fixed length arrays (the OCCURS
        clause or ARRAY clause)
  .
        One-dimensional, variable length arrays (the OCCURS
        DEPENDING ON clause-note that BASIC does not
        support this clause)

  Arrays are valid for any CDD/Repository field. BASIC does
  not support dimensions on a RECORD statement; there-
  fore, you cannot declare an entire RECORD statement as
  an array. However, you can dimension an instance of the
  record.

  The following is an example of a CDDL data definition con-
  taining arrays and the corresponding BASIC RECORD
  statement:

  CDDL Definition
  
EXAMPLE: Click to display example.

  Translated RECORD Statement
  
EXAMPLE: Click to display example.

  By default, arrays in CDD/Repository are row-major. This
  means that when storage is allocated for the array, the
  rightmost subscript varies fastest. All BASIC arrays are
  row-major. BASIC does not support column-major arrays.
  If a CDD/Repository definition containing a column-major
  array is extracted, BASIC signals the error ``<array-name>
  from CDD/Repository is a column major array''.

  By default, BASIC extracts an array field from CDD/Repository
  with the bounds specified in the data definition. However, if
  you use the qualifier /OLD_VERSION=CDD_ARRAYS when
  you extract a data definition, BASIC translates the data def-
  inition with lower bounds as zero and adjusts the upper
  bounds. This means that an array with dimensions of (2,5) in
  CDD/Repository is translated by BASIC to be an array with
  a lower bound of 0 and an upper bound of 3. BASIC issues
  an informational message to confirm the array bounds when
  you use this qualifier.

  The following CDD/Repository data definition and corre-
  sponding RECORD statement are extracted with the /OLD_
  VERSION=CDD_ARRAYS qualifier:

  CDDL Definition
  
EXAMPLE: Click to display example.

  Translated RECORD Statement
  
EXAMPLE: Click to display example.