Ada Programming/Delimiters/double dot

The delimiter .. is used to specify ranges in any scalar type.

For example:

Count  0 .. Max_Count;
 * In numeric type definitions:

Week_Day Day_Name  Monday .. Friday;
 * In subtype definitions:

Vector_A : Vector (0 .. 31);
 * In variable declarations:

X Y .. Y + Epsilon;
 * In membership tests:

Day Day_Name  Monday .. Thursday ;
 * In for loops:

Vector_A (Vector_A' .. Vector_A' + Vector_B' - 1) := Vector_B;
 * In arrays:

Usage notes
When a whole type range will be specified, it is better to use the attribute.

For example, instead of using:

Day  Day_Name' .. Day_Name' ; it is better to use:

Day Day_Name' ;

Wikibook

 * Ada Programming
 * Ada Programming/Delimiters
 * Ada Programming/Attributes/'Range

Ada Reference Manual


|..