A schema type is a user-defined construct that provides a
template for a family of distinct data types. A schema type
definition contains one or more formal discriminants that take
the place of specific boundary values or variant-record
selectors. By specifying boundary or selector values to a
schema type, you form a valid data type; the provided boundary
or selector values are called actual discriminants.
Syntax:
schema-identifier
({discriminant-identifier},... : [[attribute-list]]
ordinal-type-name};...) = [[attribute-list]] type-denoter;
The 'schema-identifier' is the name of the schema.
The 'discriminant-identifier' is the name of a formal
discriminant.
The 'ordinal-type-name' is the type of the formal discriminant,
which must be an ordinal type.
The 'attribute-list' is one or more identifiers that provide
additional information about the type-denoter.
The 'type-denoter' is the type definition of the components of
the schema. This must define a new record, array, set, or
subrange type.
Each schema type definition requires at least one discriminant
identifier. A discriminant identifier does not have to be used
in the type-denoter definition, but it is used to determine type
compatibility. Discriminant identifiers can appear anywhere a
value is required in this definition.
TYPE
Array_Template( Upper_Bound : INTEGER )
The identifier Upper_Bound is the formal discriminant of the
Array_Template schema. The Array_Template schema is not a
complete description of data. It is not a valid data type until
you provide an actual discriminant that designates the upper
boundary of the array template.
Actual discriminants can be compile-time or run-time
expressions. This expression must be assignment compatible with
the ordinal type specified for the formal discriminant. Also,
the actual discriminant value must be inside the range specified
for the formal discriminant; in the case of subranges, the upper
value must be greater than or equal to the lower value.
Additional Information:
explode
extract