Integer type definitions cannot contain a RANG 86-07-23 AI-00240/05 1
| !standard 03.05.04 (03) 86-07-23 AI-00240/05
| !class ramification 85-09-04
| !status approved by WG9/AJPO 86-07-22
| !status approved by Director, AJPO 86-07-22
| !status approved by WG9/Ada Board 86-07-22
| !status approved by Ada Board 86-07-22
!status approved by WG9 85-11-18
!status committee-approved (6-0-3) 85-09-04
!status work-item 84-06-12
!status received 84-05-03
!references 83-00357
!topic Integer type definitions cannot contain a RANGE attribute
!summary 85-09-20
A range attribute is not allowed in an integer type definition.
!question 85-09-20
The syntax rules permit the following declaration:
type INT is range T'RANGE;
where T is declared as an array type. 3.5.4(3) requires that "each bound of
the range [in an integer type definition] must be defined by a static
expression of some integer type." Does this imply that T'RANGE is legal if
and only if the bounds for T are declared with static integer expressions, or
was it the intent to forbid the use of T'RANGE in this context?
!response 85-09-20
3.5.4(3) says "If a range constraint is used as an integer type definition,
each bound of the range must be defined by a static expression of some
integer type ..." The range attribute T'RANGE is defined to "yield the range
T'FIRST .. T'LAST" [3.6.2(7)] and T'FIRST is not a static expression, so a
range attribute is not allowed in an integer type definition.