H.1 Pragma Normalize_Scalars
This pragma ensures that an otherwise uninitialized
scalar object is set to a predictable value, but out of range if possible.
Syntax
The form of a
pragma
Normalize_Scalars is as follows:
pragma Normalize_Scalars;
Post-Compilation Rules
Pragma Normalize_Scalars
is a configuration pragma. It applies to all
compilation_units
included in a partition.
Documentation Requirements
If a
pragma
Normalize_Scalars applies, the implementation shall document the implicit
initial values for scalar subtypes, and shall identify each case in which
such a value is used and is not an invalid representation.
Implementation Advice
Whenever possible, the implicit initial values for
a scalar subtype should be an invalid representation (see
13.9.1).
NOTE 1 The initialization requirement
applies to uninitialized scalar objects that are subcomponents of composite
objects, to allocated objects, and to stand-alone objects. It also applies
to scalar
out parameters. Scalar subcomponents of composite
out
parameters are initialized to the corresponding part of the actual, by
virtue of
6.4.1.
NOTE 2 The initialization requirement
does not apply to a scalar for which pragma Import has been specified,
since initialization of an imported object is performed solely by the
foreign language environment (see
B.1).
NOTE 3 The use of pragma Normalize_Scalars
in conjunction with Pragma Restrictions(No_Exceptions) can result in
erroneous execution (see
H.4).
Ada 2005 and 2012 Editions sponsored in part by Ada-Europe