Description[edit | edit source]
The meaning of the attribute depends on the meaning of the prefix X.
If X is a scalar subtype, X'Range represents the range of valid values for that subtype, i.e. it is the same as the subtype itself.
If X is a constrained array subtype or an array object, X'Range denotes the index range of X.
If X is multidimensional, the attribute needs a static parameter N to identify the N-th index; 'Range (1) is the same as 'Range.
Examples[edit | edit source]
range1..10; -- T'Range is equal to T
ofS; -- these three A'Range is the same as T
ofS; -- declarations
array(T'First .. T'Last )
ofS; -- are equivalent
ofS; -- B'Range is illegal (B is unconstrained)
isB (2 .. 5); -- SB'Range is the same as 2 .. 5
ofS; -- M'Range is equivalent to M'Range (1), which is Boolean -- M'Range (2) is the same as T