-- Operations
-- ----------
--- [Wide_[Wide_]]Image attribute (see RM 3.5(27.1/2))
+-- [Wide_[Wide_]]Image attribute (see RM 4.10(30))
-- These attributes return a decimal real literal best approximating
-- the value (rounded away from zero if halfway between) with a
-- Operations
-- ----------
--- [Wide_[Wide_]]Image attribute (see RM 3.5(27.1/2))
+-- [Wide_[Wide_]]Image attribute (see RM 4.10(30))
-- These attributes return a decimal real literal best approximating
-- the value (rounded away from zero if halfway between) with a
-- Computes fixed_type'Image (V), where V is the integer value (in units of
-- delta) of a decimal type whose Scale is as given and stores the result
-- S (1 .. P), updating P on return. The result is computed according to
- -- the rules for image for fixed-point types (RM 3.5(34)). The caller
+ -- the rules for image for fixed-point types (RM 4.10(14)). The caller
-- guarantees that S is long enough to hold the result and has a lower
-- bound of 1.
-- Computes fixed_type'Image (V), where V is the integer value (in units of
-- small) of an ordinary fixed point type with small Num/Den, and stores
-- the result in S (1 .. P), updating P on return. The result is computed
- -- according to the rules for image for fixed-point types (RM 3.5(34)).
+ -- according to the rules for image for fixed-point types (RM 4.10(14)).
-- For0 and Aft0 are the values of the Fore and Aft attributes for the
-- fixed point type whose mantissa type is Int and whose small is Num/Den.
-- This function is used only for fixed point whose Small is the ratio of
Aft : Natural);
-- Computes fixed_type'Image (V) and returns the result in S (1 .. P)
-- updating P on return. The result is computed according to the rules for
- -- image for fixed-point types (RM 3.5(34)), where Aft is the value of the
+ -- image for fixed-point types (RM 4.10(14)), where Aft is the value of the
-- Aft attribute for the fixed-point type. The caller guarantees that S is
-- long enough to hold the result and has a lower bound of 1.
--
Digs : Natural);
-- Computes Uns'Image (V) and returns the result in S (1 .. P) updating P
-- on return. The result is computed according to the rules for image for
- -- floating-point types (RM 3.5(33)), where Digs is the value of the Digits
- -- attribute for the floating-point type. The caller guarantees that S is
- -- long enough to hold the result and has a lower bound of 1.
+ -- floating-point types (RM 4.10(13)), where Digs is the value of the
+ -- Digits attribute for the floating-point type. The caller guarantees that
+ -- S is long enough to hold the result and has a lower bound of 1.
procedure Set_Image_Real
(V : Num;
-- Computes fixed_type'Image (V), where V is the integer value (in units of
-- delta) of a decimal type whose Scale is as given and stores the result
-- S (1 .. P), updating P on return. The result is computed according to
- -- the rules for image for fixed-point types (RM 3.5(34)). The caller
+ -- the rules for image for fixed-point types (RM 4.10(14)). The caller
-- guarantees that S is long enough to hold the result and has a lower
-- bound of 1.
-- Computes fixed_type'Image (V), where V is the integer value (in units of
-- small) of an ordinary fixed point type with small Num/Den, and stores
-- the result in S (1 .. P), updating P on return. The result is computed
- -- according to the rules for image for fixed-point types (RM 3.5(34)).
+ -- according to the rules for image for fixed-point types (RM 4.10(14)).
-- For0 and Aft0 are the values of the Fore and Aft attributes for the
-- fixed point type whose mantissa type is Int64 and whose small is
-- Num/Den. This function is used only for fixed point whose Small is an
Character'Val (16#9F#) => "APC"];
begin
- -- Control characters are represented by their names (RM 3.5(32))
+ -- Control characters are represented by their names (RM 4.10(12))
if V in C0_Range then
S (1 .. 3) := C0 (V);
end;
end if;
- -- Normal characters yield the character enclosed in quotes (RM 3.5(32))
+ -- Normal characters yield the character enclosed in quotes
+ -- (RM 4.10(12)).
else
S (1) := ''';
(Str, Index, Max, Base, False, Value, Scale, N,
Char_As_Digit (Extra), Base_Violation);
- -- A dot is allowed only if followed by a digit (RM 3.5(47))
+ -- A dot is allowed only if followed by a digit (RM 3.5(39.8))
elsif Str (Index) = '.'
and then Index < Max
else
-- For floating-point, we have +N.dddE+nnn where length
-- of ddd is determined by type'Digits - 1, but is one
- -- if Digits is one (RM 3.5 (33)).
+ -- if Digits is one (RM 4.10 (13)).
-- nnn is set to 2 for Short_Float and Float (32 bit
-- floats), and 3 for Long_Float and Long_Long_Float.
-- The non-null case depends on the specific real type
else
- -- For fixed-point type width is Fore + 1 + Aft (RM 3.5(34))
+ -- For fixed-point type width is Fore + 1 + Aft
+ -- (RM 4.10(14)).
Fold_Uint
(N, UI_From_Int (Fore_Value + 1) + Aft_Value (P_Type),