diff options
Diffstat (limited to 'gcc/ada/s-imguns.ads')
-rw-r--r-- | gcc/ada/s-imguns.ads | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/gcc/ada/s-imguns.ads b/gcc/ada/s-imguns.ads index 6ec636b4fe1..6ed50e22b73 100644 --- a/gcc/ada/s-imguns.ads +++ b/gcc/ada/s-imguns.ads @@ -40,20 +40,23 @@ with System.Unsigned_Types; package System.Img_Uns is pragma Pure; - function Image_Unsigned - (V : System.Unsigned_Types.Unsigned) - return String; - -- Computes Unsigned'Image (V) and returns the result + procedure Image_Unsigned + (V : System.Unsigned_Types.Unsigned; + S : in out String; + P : out Natural); + pragma Inline (Image_Unsigned); + -- Computes Unsigned'Image (V) and stores the result in S (1 .. P) + -- setting the resulting value of P. The caller guarantees that S + -- is long enough to hold the result, and that S'First is 1. procedure Set_Image_Unsigned (V : System.Unsigned_Types.Unsigned; - S : out String; + S : in out String; P : in out Natural); - -- Sets the image of V starting at S (P + 1) with no leading spaces (i.e. - -- Text_IO format where Width = 0), starting at S (P + 1), updating P - -- to point to the last character stored. The caller promises that the - -- buffer is large enough and no check is made for this (Constraint_Error - -- will not be necessarily raised if this is violated since it is perfectly - -- valid to compile this unit with checks off). + -- Stores the image of V in S starting at S (P + 1), P is updated to point + -- to the last character stored. The value stored is identical to the value + -- of Unsigned'Image (V) except that no leading space is stored. The caller + -- guarantees that S is long enough to hold the result. S need not have a + -- lower bound of 1. end System.Img_Uns; |