# Ada Programming/Aspects

subprograms are declared, certain properties thereof normally are left
to the compiler to specify (like the size or the address of a variable,
the calling convention of a subprogram). Properties which may be queried
are called Attributes; those
which may be specified are called *Aspects*. Some aspects correspond
with attributes which then have the same name. Aspects and attributes
are defined in the Ada Reference Manual
,
pragmas in
.

## Description

*Aspects* are certain properties of an entity that may be specified,
depending on the kind of entity, by an aspect specification as part of
its declaration or by a separate attribute definition clause or pragma
declaration.

`Aspect_Specification ::=`\
`  `` `*`Aspect_Name`*` [ => `*`Aspect_Definition`*`] {,`\
`       `*`Aspect_Name`*` [ => `*`Aspect_Definition`*`] } ;`

`Attribute_Definition_Clause ::= `\
`     `` entity_name'attribute_designator `` expression;`\
`   | `` entity_name'attribute_designator `` name;`

` Name (Parameter_List);`

If an aspect is not specified, it depends on the aspect itself whether
its value is left to the compiler or prescribed in the Ada RM.

The specification of a `Boolean` valued aspect may omit the aspect
definition, which then has the value `True`.

Examples of such properties are the size of a type, i.e. the number of
bits a stand-alone object of that type will use; or that a subprogram
will not return from its call: aspect
. This latter one is an
example of an aspect that has a `Boolean` value.

## List of language defined aspects

If not marked otherwise, an aspect is specified by an
*Aspect_Specification*.

An aspect marked *Ada 2012* is an
Ada 2012 language functionality
not available in previous Ada generations. Aspects not so marked were
previously defined via pragmas or attribute definition clauses. This is
still possible, but deprecated.

### A -- D

-   Address
    `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-   Alignment
    `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Pragma)`</small>`{=html}

-   
-   
-   
-   
-   Bit_Order
    `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-   Coding
    `<small>`{=html}(Enumeration_Representation_Clause)`</small>`{=html}

-   Component_Size
    `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   
-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012; Pragma)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012; Aspect_Specification,
    Pragma)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

### E -- O

-       `<small>`{=html}(Pragma)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   
-   
-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   
-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   
-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012;
    Attribute_Definition_Clause)`</small>`{=html}

-   
-   
-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   Layout
    `<small>`{=html}(Record_Representation_Clause)`</small>`{=html}

-   
-   Machine_Radix
    `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-   
-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012;
    Attribute_Definition_Clause)`</small>`{=html}

### P -- Z

-   
-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Pragma)`</small>`{=html}

-   
-       `<small>`{=html}(Pragma)`</small>`{=html}

-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012;
    Attribute_Definition_Clause)`</small>`{=html}

-   
-       `<small>`{=html}(Pragma)`</small>`{=html}

-       `<small>`{=html}(Pragma)`</small>`{=html}

-       `<small>`{=html}(Pragma)`</small>`{=html}

-   Size
    `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   
-       `<small>`{=html}(Ada 2012)`</small>`{=html}

-   
-   
-       `<small>`{=html}(Attribute_Definition_Clause)`</small>`{=html}

-       `<small>`{=html}(Ada 2012;
    Attribute_Definition_Clause)`</small>`{=html}

## List of implementation defined aspects

The following pragmas are not available in all Ada compilers, only in
those that had implemented them.

Currently, there are only listed the implementation-defined pragmas of a
few compilers. You can help Wikibooks
adding
specific aspects of other compilers:

GNAT : Implementation defined aspect of the GNAT compiler from AdaCore and FSF.

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

-       `<small>`{=html}(GNAT)`</small>`{=html}

## See also

### Wikibook

-   Ada Programming
-   Ada Programming/Attributes
-   Ada Programming/Keywords
-   Ada Programming/Pragmas

### Ada Reference Manual

#### Ada 2012

-   
-   
-   
## References

```{=html}
<references/>
```
Programming}}\|Aspects

