22.9.2 Integer Data Types
CDD/Repository refers to integer data types as fixed-
point data types. CDD/Repository supports BYTE, WORD,
LONGWORD, QUADWORD, and OCTAWORD integer
data types. Each of these data types can have the following
additional attributes:
SIGNED
UNSIGNED
SIZE
DIGITS
FRACTION
BASE
SCALE
In CDDL, if integer data types are not specified as being
signed or unsigned, the default is unsigned. BASIC supports
only signed BYTE, signed WORD, and signed LONGWORD
integers. If a CDD/Repository data definition containing an
unsigned BYTE, WORD, or LONGWORD integer is ex-
tracted, BASIC signals the informational message ``Datatype
in CDD/Repository not supported, substituted group for:
<field-name>'', and creates a group to contain the field.
Because the group name is the same as the CDD/Repository
field name, BASIC assigns a new name to the field. This
is shown in the following CDDL data definition and corre-
sponding BASIC RECORD statement:
CDDL Definition
EXAMPLE: Click to display example.
Translated RECORD Statement
EXAMPLE: Click to display example.
When the previous data definition is extracted from
CDD/Repository, BASIC signals an informational mes-
sage for each of the unsigned data types, and names the
CDD/Repository unsigned byte field BYTE_VALUE, the
CDD/Repository unsigned word field WORD_VALUE, and
the CDD/Repository unsigned longword field LONG_VALUE.
BASIC does not support QUADWORD or OCTAWORD inte-
gers. If a CDD/Repository definition contains a QUADWORD
or OCTAWORD integer, BASIC signals the informational
message ``Datatype in CDD/Repository not supported, sub-
stituted group for: <field-name>'' and creates a group to
contain the field and a string component within the group.
The string component is 8 bytes for QUADWORD integers
and 16 bytes for OCTAWORD integers. For example:
CDDL Definition
EXAMPLE: Click to display example.
Translated RECORD Statement
EXAMPLE: Click to display example.
CDD/Repository supports the SCALE keyword to specify an
implied exponent in integer data types, and the BASE key-
word (supported in CDDL only) to specify that the scale
for a fixed-point field is to be interpreted in a numeric
base other than 10. BASIC does not support these integer
attributes. Therefore, BASIC signals the informational mes-
sage ``CDD/Repository specifies SCALE for <name>. Not
supported'', for fixed-point fields containing a SCALE spec-
ification and the error message, ``CDD/Repository attributes
for <name> are other than base 10'', for fixed-point fields
specifying a base other than 10. For example:
CDDL Definition
EXAMPLE: Click to display example.
Translated RECORD Statement
EXAMPLE: Click to display example.
At compilation time, BASIC also signals these warning errors
for each reference to fields that are not base 10 or that have
a SCALE.