Ada Programming/Attributes/'Length

Description
'Length is an array type attribute. It may be used with or without an input parameter.

Without an input parameter, 'Length is an integer that represents the length of the first dimension of the array type.

With an input parameter, 'Length(N) is an integer that represents the length of the Nth dimension of the array type. N must be a positive number within the dimensions of the array.

Example
If you declare:

My_Vector  (1 .. 7)  Integer; My_Matrix  (1 .. 5, 1 .. 10)  Integer;

then

(My_Vector'Length = 7); (My_Matrix'Length(1) = 5); (My_Matrix'Length(2) = 10); (My_Vector'Length(1) = My_Vector'Length); (My_Matrix'Length(1) = My_Matrix'Length);

Wikibook

 * Ada Programming

Ada Reference Manual


|Length Length