3.3. Section 3: Declarations and Types

Declarations and types are supported as specified in the Ada standard except for tagged types (See RM Section 3.9).

3.3.1. Uninitialized Variables

When the compile time option -Wuninitialized is used, the compiler flags variables that may be uninitialized.

3.3.2. Enumeration Types

Enumeration types are supported as defined in the Ada 95 Reference Manual. Additional code and read-only data are generated to support the attributes 'Image, 'Pos and 'Val.

The size of enumeration objects is the minimum required to accommodate all the values, and including any representations given in a representation clause. The compiler selects a size of 16 or 32 bits as appropriate.

Enumeration types may be packed to reduce wasted space in arrays of enumeration objects.

3.3.3. Integer Types

M1750 Ada provides five predefined Integer types:

Table 3-1 gives the values of the attributes Size, First and Last for these types.

Table 3-1. Attributes of the Predefined Integer Types

TypeSizeFirstLast
Short_Short_Integer 16 -215 215-1
Short_Integer16-215215-1
Integer16-215215-1
Long_Integer32-231231-1
Long_Long_Integer64-263263-1

User-Defined Types. For a user-defined integer type, the compiler automatically selects the smallest compatible predefined integer type as the base type. For example, given the following type definition:


type My_Integer is range -10 .. +10;

the compiler uses Short_Short_Integer as the base type, and My_Integer'Size is 16 bits.

Modular Types. M1750 Ada supports modular types up to 64 bits in size. Like the integer types, these are represented in 16, 32 or 64 bits as appropriate. The value of Max_Nonbinary_Modulus is 32767. The following declarations are legal:


type Unsigned_8 is mod 256;
type Unsigned_16 is mod 65536;
type Unsigned_32 is mod 2**32;
type Unsigned_64 is mod 2**64;
type Index is mod 32767;

The standard Ada 95 operators for modular types are supported.

3.3.4. Floating Point Types

M1750 Ada provides four predefined floating-point types:

The types Short_Float and Float are represented by the 32-bit single precision 1750 format; the types Long_Float and Long_Long_Float are represented by the 48-bit 1750 format.

Table 3-2 gives the values of the attributes for the predefined floating-point types.

Table 3-2. Basic Attributes of Floating Point Types

AttributeShort FloatFloatLong FloatLong Long Float
Size 32 32 48 48
Digits 6 6 9 9
Machine_Radix 2 2 2 2
Machine_Mantissa 23 23 39 39
Machine_Emax 127 127 127 127
Machine_Emin -128 -128 -128 -128
Machine_Rounds False False False False
Machine_Overflows False False False False

3.3.5. Fixed Point Types

M1750 Ada supports fixed-point types up to 64 bits in size using 16, 32 or 64 bits as appropriate. The value of 'Small may be either a power of two, or an arbitrary value given in a representation clause.