3 with Unchecked_Conversion
;
5 procedure Unchecked_Convert12
is
7 subtype Unsigned_Type
is Integer range 2_034
.. 2_164
;
9 subtype Signed_Type
is Integer range -2048 .. 2047;
16 function To_Signed_Type
is
17 new Unchecked_Conversion
(Source
=> Rec
, Target
=> Signed_Type
);
19 function To_Unsigned_Type
is
20 new Unchecked_Conversion
(Source
=> Signed_Type
, Target
=> Rec
);
28 Temp
:= To_Unsigned_Type
(Data
);
29 if Temp
.S
/= 2100 then
32 Data
:= To_Signed_Type
(Temp
);
38 Temp
:= To_Unsigned_Type
(Data
);
39 if Temp
.S
/= 2047 then
42 Data
:= To_Signed_Type
(Temp
);