| simple_expression .. simple_expression
12 | S'First | S'First denotes the lower bound of the range of S. The value of this attribute is of the type of S. |
13 | S'Last | S'Last denotes the upper bound of the range of S. The value of this attribute is of the type of S. |
25 | S'Pred | S'Pred denotes a function with the following specification: |
return Wide_String
35 | S'Image | S'Image denotes a function with the following specification: |
39 | S'Width | S'Width denotes the maximum length of a String returned by S'Image over all values of the subtype S. It denotes zero for a subtype that has a null range. Its type is universal_integer.
|
49 · base#based_numeral.#[exponent]
50 · base#.based_numeral#[exponent]
52 | S'Value | S'Value denotes a function with the following specification: |
X .. X + 1
0.0 .. 2.0*Pi
Red .. Green -- see 3.5.1
1 .. 0 -- a null range
Table'Range -- a range attribute reference (see 3.6)
range S'First+1 .. S'Last-1
(enumeration_literal_specification {, enumeration_literal_specification})
type Suit is (Clubs, Diamonds, Hearts, Spades);
type Gender is (M, F);
type Level is (Low, Medium, Urgent);
type Color is (White, Red, Yellow, Green, Blue, Brown, Black);
type Light is (Red, Amber, Green); -- Red and Green are overloaded
type Mixed is ('A', 'B', '*', B, None, '?', '%');
subtype Major is Suit range Hearts .. Spades;
subtype Rainbow is Color range Red .. Blue; -- the Color Red, not the Light
subtype Positive is Integer range 1 .. Integer'Last;
type Line_Size is range 1 .. Max_Line_Size;
subtype Column_Ptr is Line_Size range 1 .. 10;
subtype Buffer_Size is Integer range 0 .. Max;
type Hash_Index is mod 97; -- modulus is prime
2 | S'Pos | S'Pos denotes a function with the following specification: |
5 | S'Val | S'Val denotes a function with the following specification: |
-- Rainbow'First = Red, Rainbow'Last = Blue
-- Color'Pos(Blue) = Rainbow'Pos(Blue) = 4
-- Color'Val(0) = Rainbow'Val(0) = White
floating_point_definition | fixed_point_definition
digits static_expression [real_range_specification]
range static_simple_expression .. static_simple_expression
type Mass is digits 7 range 0.0 .. 1.0E35;
delta static_expression real_range_specification
delta static_expression digits static_expression [real_range_specification]
digits static_expression [range_constraint]
-- space in a word can be declared as the type Fraction:
type Fraction is delta System.Fine_Delta range -1.0 .. 1.0;
-- Fraction'Last = 1.0 - System.Fine_Delta
subtype Salary is Money digits 10;
-- Money'Last = 10.0**13 - 0.01, Salary'Last = 10.0**8 - 0.01
2 | S'Small | S'Small denotes the small of the type of S. The value of this attribute is of the type universal_real. Small may be specified for nonderived fixed point types via an attribute_definition_clause (see 13.3); the expression of such a clause shall be static.
|
4 | S'Fore | S'Fore yields the minimum number of characters needed before the decimal point for the decimal representation of any value of the subtype S, assuming that the representation does not include an exponent, but includes a one-character prefix that is either a minus sign or a space. (This minimum number does not include superfluous zeros or underlines, and is at least 2.) The value of this attribute is of the type universal_integer.
|
12 | S'Round | S'Round denotes a function with the following specification: |