====== Compound types ======
===== Definitions =====
==== composite_type_definition ====
* [[.:bnf#array_type_definition]]
* [[.:bnf#record_type_definition]]
===== Examples =====
//mt_word// is declared as a bit vector of the width 32, with the indices rising from left to right.
TYPE my_word IS ARRAY ( 0 TO 31 )
OF bit ;
----
//data_in// is declared as a vector of the type //five_level_logic// and the width 8, with the indices descending from left to right.
TYPE data_in IS ARRAY ( 7 DOWNTO 0 )
OF five_level_logic
----
//memory// is declared as a vector of the type //my_word// with an arbitrary width (<>). Direction and maximum width is determined by the type //integer// .
TYPE memory IS ARRAY (integer
RANGE <>) OF my_word ;
----
//t// is declared as a vector of the type //element// with the width 1+( //max// - //min// ) [type //positive//] .
TYPE t IS ARRAY
(positive RANGE min TO max)
OF element;
----
//date// is declared as Record which consists of the elements //day// , //month// and //year// .
TYPE date IS
RECORD
day : integer RANGE 1 TO 31;
month : month_name;
year : integer RANGE 0 TO 2100;
END RECORD ;