array_aggregate ::= positional_array_aggregate | named_array_aggregate
positional_array_aggregate ::= (expression, expression {, expression}) | (expression {, expression}, others => expression)
named_array_aggregate ::= (array_component_association {, array_component_association})
array_component_association ::= discrete_choice_list => expression
NOTES
(7, 9, 5, 1, 3, 2, 4, 8, 6, 0) Table'(5, 8, 4, 1, others => 0) -- See section 3.6 Array Types
(1 .. 5 => (1 .. 8 => 0.0)) -- two-dimensional (1 .. N => new Cell) -- N new cells, in particular for N = 0
Table'(2 | 4 | 10 => 1, others => 0) Schedule'(Mon .. Fri => True, others => False) Schedule'(Wed | Sun => False, others => True) -- See section 3.6 Array Types Vector'(1 => 2.5) -- single-component vector
-- Three aggregates for the same value of subtype -- Matrix(1..2,1..3), See section 3.6 Array Types
((1.1, 1.2, 1.3), (2.1, 2.2, 2.3)) (1 => (1.1, 1.2, 1.3), 2 => (2.1, 2.2, 2.3)) (1 => (1 => 1.1, 2 => 1.2, 3 => 1.3), 2 => (1 => 2.1, 2 => 2.2, 3 => 2.3))
A : Table := (7, 9, 5, 1, 3, 2, 4, 8, 6, 0); -- A(1)=7, A(10)=0 B : Table := (2 | 4 | 10 => 1, others => 0); -- B(1)=0, B(10)=1 C : constant Matrix := (1 .. 5 => (1 .. 8 => 0.0)); -- C'Last(1)=5, C'Last(2)=8
D : Bit_Vector(M .. N) := (M .. N => True); -- See section 3.6 Array Types E : Bit_Vector(M .. N) := (others => True); F : String(1 .. 1) := (1 => 'F'); -- a one component aggregate: same as "F"
Go to the first, previous, next, last section, table of contents.