Slices, and some other constructs that take ranges, can also take subtype names.
subtype Name_Prefix_Range is Integer range 1 .. 3;
and then you can use
Name (Name_Prefix_Range)
as well as
for I in Name_Prefix_Range loop
...
end loop;
In the language syntax, you can use a subtype name like this anywhere a discrete_range
is needed. The syntax of slices in RM 4.1.2 uses it.
Note that when I say "subtype name", this includes a "type name" defined by a type
declaration; the name is technically a "first subtype" name. So it's syntactically legal to say
Name (Integer)
but you will get a Constraint_Error
at runtime. More legitimate would be to do something like this:
for B in Boolean loop ...
for Ch in Character loop ...