Annotated Ada Reference Manual (Ada 202x Draft 25)Legal Information
Contents   Index   References   Search   Previous   Next 

4.1.4 Attributes

1
[An attribute is a characteristic of an entity that can be queried via an attribute_reference or a range_attribute_reference.]
1.a.1/5
Glossary entry: A characteristic or property of an entity that can be queried, and in some cases specified.

Syntax

2/5
{AI12-0262-1} attribute_reference ::= 
    prefix'attribute_designator
  | reduction_attribute_reference
3/2
{AI05-0004-1} attribute_designator ::= 
    identifier[(static_expression)]
  | Access | Delta | Digits | Mod
4
range_attribute_reference ::= prefix'range_attribute_designator
5
range_attribute_designator ::= Range[(static_expression)]

Name Resolution Rules

6/5
{AI12-0242-1} {AI12-0262-1} In an attribute_reference that is not a reduction_attribute_reference, if the attribute_designator is for an attribute defined for (at least some) objects of an access type, then the prefix is never interpreted as an implicit_dereference; otherwise (and for all range_attribute_references and reduction_attribute_references), if there is a prefix and the type of the name within the prefix is of an access type, the prefix is interpreted as an implicit_dereference. Similarly, if the attribute_designator is for an attribute defined for (at least some) functions, then the prefix is never interpreted as a parameterless function_call; otherwise (and for all range_attribute_references and reduction_attribute_references), if there is a prefix and the prefix consists of a name that denotes a function, it is interpreted as a parameterless function_call.
6.a
Discussion: The first part of this rule is essentially a "preference" against imp