22.7 CDD/Repository Variants
A variant comprises two or more fields of a record that
provide alternative descriptions for the same portion of a
record.
The following is an example of a CDDL data definition con-
taining variant fields and the corresponding BASIC RECORD
statement:
CDDL Definition
EXAMPLE: Click to display example.
Translated RECORD Statement
EXAMPLE: Click to display example.
CDD/Repository data definitions sometimes contain VARIANTS
OF field description statements as well as simple variants.
A CDDL or CDO VARIANTS OF statement names a tag
variable whose value at run time determines which of the
variant fields is the current variant. BASIC does not sup-
port the VARIANTS OF statement. If a CDD/Repository
data definition containing a VARIANTS OF statement is
extracted, BASIC signals the informational message, ``<num-
ber> tag value from CDD/Repository ignored'' and treats the
VARIANTS OF as an ordinary variant and ignores the tag
value.