Titan



type


The keyword is used to specify user-defined structured types.


type ( record | union | set | record of | set of | enumerated | port | component ) identifier  { body };


Another use of the keyword is the subtype definition.


type parent_identifier  (identifier  | address) [array_def] [(list)] [length] ;  


Example 1:

type enumerated Example {tisdag, fredag, onsdag};

The enumerated type called Example containing three elements is defined.

Example 2:

type Ex_subt Example (tisdag, onsdag);

The sub-type, called Ex_subt, may contain only two elements of the parent type (called Example).


BNF definition of type