5. Embedded QUEL for Ada : Ada Variables and Data Types : Variable and Type Declarations : Type Definition
 
Share this page                  
Type Definition
An EQUEL/Ada full type declaration has the following syntax:
type identifier [discriminant_partis type_definition;
Syntax Notes:
1. The discriminant_part has the syntax:
(discriminant_specifications)
and is not processed by EQUEL. As with variable declarations, a discriminant specification will always be accepted by EQUEL, even if not allowed by Ada. For example, the following declaration will be accepted by EQUEL but will later generate an Ada compiler error, because the discriminant type is not a discrete type and the discriminant part is not allowed in a non-record declaration:
## type shapes(name: String := "BOX") 
##      is array(1..10) of String(1..3);
From this point on, discriminant parts are not included in the syntax descriptions or notes.
2. The legal type_definitions allowed in type declarations are described below.