## 3.3.2 Number Declarations

25
May

1 A number_declaration declares a named number.

1.a Discussion: {static} If a value or other property of a construct is required to be static that means it is required to be determined prior to execution. A static expression is an expression whose value is computed at compile time and is usable in contexts where the actual value might affect the legality of the construct. This is fully defined in clause 4.9.

#### Syntax

2 number_declaration ::= defining_identifier_list : constant := static_expression;

#### Name Resolution Rules

3 {expected type (number_declaration expression) [partial]} The static_expression given for a number_declaration is expected to be of any numeric type.

#### Legality Rules

4 The static_expression given for a number declaration shall be a static expression, as defined by clause 4.9.

#### Static Semantics

5 The named number denotes a value of type universal_integer if the type of the static_expression is an integer type. The named number denotes a value of type universal_real if the type of the static_expression is a real type.

6 The value denoted by the named number is the value of the static_expression, converted to the corresponding universal type. {implicit subtype conversion (named number value) [partial]}

#### Dynamic Semantics

7 {elaboration (number_declaration) [partial]} The elaboration of a number_declaration has no effect.

7.a Proof: Since the static_expression was evaluated at compile time.

#### Examples

8 Examples of number declarations:

9

`Two_Pi        : constant := 2.0*Ada.Numerics.Pi;   -- a real number (see A.5)`

10/2

```Max           : constant := 500;                   -- an integer number
Max_Line_Size : constant := Max/6;                 -- the integer 83
Power_16      : constant := 2**16;                 -- the integer 65_536
One, Un, Eins : constant := 1;                     -- three different names for 1```