Skip to main content

J.8 Mod Clauses

danger

This Reference Manual output has not been verified, and may contain omissions or errors. Report any problems on the tracking issue

Syntax

1

mod_clause ::= at mod static_expression;

Static Semantics

2

A record_representation_clause of the form:

3/3

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).