Aggregate

LRM §7.3.2.

A basic operation that combines one or more values into a composite value of a record or array type.

Syntax:

( [ choices => ] expression, ... ) 
choices = choice | ... 
choice = constant_expression | range | others   -- the last choice

Description:

The aggregate assigns one or more values to the elements of a record or array creating the composite value of this type. Aggregates are composed of element associations, which associate expressions to elements (one expression per one or more elements). Element associations are specified in parentheses and are separated by commas.

An expression assigned to an element or elements must be of the same type as the element(s).

Elements can be referred to either using positional assocation  (an ordered list), named association (explicitly identifying each element by name) or a combination of both. In any case if the association others is used, it must be the last one in an aggregate.

The choice clause, denoting selection of element(s) can have any of the following forms: simple expression, discrete range, simple name or reserved word others.

The aggregate (others => expression) is a useful way of setting all the elements of an array to the same value; it's not necessary to know the size of the array.

Example:

(1, 2, 3, 4) 
(A => 1, B => 3, C => 5, D => 7) 
(1, 2, D => 7, C => 5) 
(1, 2, others => 0)

Notes:

See also:

Array, Composite, Expression, Record