|
LCS-2016-018b |
|
1 {04-Jan-2017} |
|
04-Jan-2017 |
|
Voting |
|
Patrick Lehmann |
|
Main.PatrickLehmann |
|
Attributes for Enumerated Types |
|
Attribute shorthands. |
'BASETYPE
to apply an O'ATTR
shall be equivalent to O'SUBTYPE'ATTR
. As an exception, the attribute 'BASE
is not defined O'ATTR
shall be equivalent to O'SUBTYPE'ATTR(O)
. 'VALUE
and 'VAL
are not defined for objects.
Example:
process type T is (A, B, C, D); variable V1 : T; variable V2 : integer := 5; begin -- The following 3 statments are equivalent and report "D". report T'image(T'right); report T'image(V1'subtype'right); report T'image(V1'right); -- The following 3 statments are equivalent and report "5". report integer'image(V2); report V2'subtype'image(V2); report V2'image; end process;