Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
 
Annotated Ada Reference Manual (Ada 2022 with Amendment 1)Legal Information
Contents   Index   References   Search   Previous   Next 

J.8 Mod Clauses

Syntax

1
mod_clause ::= at mod static_expression;

Static Semantics

2
A record_representation_clause of the form: 
3/3
{AI05-0092-1} for r use
    record at mod a;
        ...
    end record;
4
is equivalent to: 
5
for r'Alignment use a;
for r use
    record
        ...
    end record;
5.a
Reason: The preferred syntax for specifying the alignment of an entity is an attribute_definition_clause specifying the Alignment attribute. Therefore, the special-purpose mod_clause syntax is now obsolete.
5.b
The above equivalence implies, for example, that it is illegal to give both a mod_clause and an attribute_definition_clause specifying the Alignment attribute for the same type. 

Wording Changes from Ada 83

5.c
Ada 83's alignment_clause is now called a mod_clause to avoid confusion with the new term “Alignment clause” (that is, an attribute_definition_clause for the Alignment attribute). 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe