|
LCS-2016-018 |
|
2 |
|
11-Jan-2017 |
|
Approved |
|
Patrick Lehmann |
|
|
|
Proposal Examples LCS History |
|
Adds new attributes for enumerated types. |
[Reviewer note: Extended existing attributes for use with objects.] | ||
P |
Kind: | Type |
Prefix: | Any prefix P that is appropriate for an object with type or subtype T, or an alias thereof, or that denotes any type or subtype T. |
|
Result: | The base type of T. | |
Restrictions: | This attribute is allowed only as the prefix of the name of another attribute; for example, P'BASE'LEFT. |
|
P |
Kind: | Value |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | Same type as T. | |
Result: | The left bound of T. | |
P |
Kind: | Value |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | Same type as T. | |
Result: | The right bound of T. | |
P |
Kind: | Value |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | Same type as T. | |
Result: | The upper bound of T. | |
P |
Kind: | Value |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | Same type as T. | |
Result: | The lower bound of T. | |
P |
Kind: | Value |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | Type BOOLEAN. | |
Result: | It is TRUE if T is defined with an ascending range; FALSE otherwise. | |
[Reviewer note: New attributes.] | ||
P'LENGTH | Kind: | Pure function |
Prefix: | Any prefix P that is appropriate for an object with a discrete or physical type or subtype T, or an alias thereof, or that denotes any discrete or physical type or subtype T. |
|
Result type: | universal_integer | |
Result: | T'LENGTH = maximum(0, T'POS(T'HIGH) - T'POS(T'LOW) + 1) | |
P'RANGE | Kind: | Range |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | The type of T. | |
Result: | The range T'LEFT to T'RIGHT if the range of T is ascending, or the range T'LEFT downto T'RIGHT if the range of T is descending. |
|
P'REVERSE_RANGE | Kind: | Range |
Prefix: | Any prefix P that is appropriate for an object with a scalar type or subtype T, or an alias thereof, or that denotes any scalar type or subtype T. |
|
Result type: | The type of T. | |
Result: | The range T'RIGHT downto T'LEFT if the range of T is ascending, or the range T'RIGHT to T'LEFT if the range of T is descending. |
|
T'IMAGE(X) | [Not modified] | |
T'VALUE(X) | [Not modified] | |
T'POS(X) | [Not modified] | |
T'VAL(X) | [Not modified] | |
T'SUCC(X) | [Not modified] | |
T'PRED(X) | [Not modified] | |
T'LEFTOF(X) | [Not modified] | |
T'RIGHTOF(X) | [Not modified] | |
O'SUBTYPE | [Not modified] | |
[Reviewer note: new attributes for objects as a shorthand to existing attributes on types.] | ||
O'IMAGE | Kind: | Pure function |
Prefix: | Any prefix O that is appropriate for an object with a scalar type or subtype, or an alias thereof. | |
Shorthand for: | O'SUBTYPE'IMAGE(O) | |
O'POS | Kind: | Pure function |
Prefix: | Any prefix O that is appropriate for an object with a discrete or physical type or subtype, or an alias thereof. | |
Shorthand for: | O'SUBTYPE'POS(O) | |
O'SUCC | Kind: | Pure function |
Prefix: | Any prefix O that is appropriate for an object with a discrete or physical type or subtype, or an alias thereof. | |
Shorthand for: | O'SUBTYPE'SUCC(O) | |
O'PRED | Kind: | Pure function |
Prefix: | Any prefix O that is appropriate for an object with a discrete or physical type or subtype, or an alias thereof. | |
Shorthand for: | O'SUBTYPE'PRED(O) | |
O'LEFTOF | Kind: | Pure function |
Prefix: | Any prefix O that is appropriate for an object with a discrete or physical type or subtype, or an alias thereof. | |
Shorthand for: | O'SUBTYPE'LEFTOF(O) | |
O'RIGHTOF | Kind: | Pure function |
Prefix: | Any prefix O that is appropriate for an object with a discrete or physical type or subtype, or an alias thereof. | |
Shorthand for: | O'SUBTYPE'RIGHTOF(O) |
Ascending range | Descending range | ||
P |
= | P |
P |
P |
= | P |
P |