CVS difference for ais/ai-00301.txt

Differences between 1.12 and version 1.13
Log of other versions for file ais/ai-00301.txt

--- ais/ai-00301.txt	2004/06/25 01:30:42	1.12
+++ ais/ai-00301.txt	2004/11/03 00:53:41	1.13
@@ -1,4 +1,4 @@
-!standard A.4.3(8)                                   04-05-25  AI95-00301/08
+!standard A.4.3(8)                                   04-11-01  AI95-00301/09
 !standard A.4.3(56)
 !standard A.4.3(58)
 !standard A.4.3(60)
@@ -202,16 +202,14 @@
 function Bounded_Slice
    (Source : in Bounded_String;
     Low    : in Positive;
-    High   : in Natural;
-    Drop   : in Truncation := Error)
+    High   : in Natural)
        return Bounded_String;
 
 procedure Bounded_Slice
    (Source : in     Bounded_String;
     Target :    out Bounded_String;
     Low    : in     Positive;
-    High   : in     Natural;
-    Drop   : in     Truncation := Error)
+    High   : in     Natural)
 
 Replace A.4.4(43) with all of th following:
 
@@ -257,8 +255,7 @@
 function Bounded_Slice
    (Source : in Bounded_String;
     Low    : in Positive;
-    High   : in Natural;
-    Drop   : in Truncation := Error)
+    High   : in Natural)
        return Bounded_String;
 
     Returns the slice at positions Low through High in the string represented
@@ -269,33 +266,29 @@
    (Source : in     Bounded_String;
     Target :    out Bounded_String;
     Low    : in     Positive;
-    High   : in     Natural;
-    Drop   : in     Truncation := Error);
+    High   : in     Natural);
 
-    Equivalent to Target := Bounded_Slice (Source, Low, High, Drop);
+    Equivalent to Target := Bounded_Slice (Source, Low, High);
 
 Add after A.4.5(11):
 
 procedure Set_Unbounded_String
    (Target :    out Unbounded_String;
-    Source : in     String;
-    Drop   : in     Truncation := Error);
+    Source : in     String);
 
 Add after A.4.5(22):
 
 function Unbounded_Slice
    (Source : in Unbounded_String;
     Low    : in Positive;
-    High   : in Natural;
-    Drop   : in Truncation := Error)
+    High   : in Natural)
        return Unbounded_String;
 
 procedure Unbounded_Slice
    (Source : in     Unbounded_String;
     Target :    out Unbounded_String;
     Low    : in     Positive;
-    High   : in     Natural;
-    Drop   : in     Truncation := Error);
+    High   : in     Natural);
 
 Add after A.4.5(38):
 
@@ -736,16 +729,14 @@
 @xcode<      @b<function> Bounded_Slice
          (Source : @b<in> Bounded_String;
           Low    : @b<in> Positive;
-          High   : @b<in> Natural;
-          Drop   : @b<in> Truncation := Error)
+          High   : @b<in> Natural)
              @b<return> Bounded_String;
 
       @b<procedure> Bounded_Slice
          (Source : @b<in>     Bounded_String;
           Target :    @b<out> Bounded_String;
           Low    : @b<in>     Positive;
-          High   : @b<in>     Natural;
-          Drop   : @b<in>     Truncation := Error);>
+          High   : @b<in>     Natural);>
 
 !corrigendum A.4.4(43)
 
@@ -788,7 +779,7 @@
 @dinss
 @xcode<@b<procedure> Set_Bounded_String
    (Target :    @b<out> Bounded_String;
-    Source : @b<in>     String);
+    Source : @b<in>     String;
     Drop   : @b<in>     Truncation := Error);>
 
 @xindent<Equivalent to Target := To_Bounded_String (Source, Drop);>
@@ -803,8 +794,7 @@
 @xcode<@b<function> Bounded_Slice
    (Source : @b<in> Bounded_String;
     Low    : @b<in> Positive;
-    High   : @b<in> Natural;
-    Drop   : @b<in> Truncation := Error)
+    High   : @b<in> Natural)
        @b<return> Bounded_String;>
 
 @xindent<Returns the slice at positions Low through High in the string
@@ -815,10 +805,9 @@
    (Source : @b<in>     Bounded_String;
     Target :    @b<out> Bounded_String;
     Low    : @b<in>     Positive;
-    High   : @b<in>     Natural;
-    Drop   : @b<in>     Truncation := Error);>
+    High   : @b<in>     Natural);>
 
-@xindent<Equivalent to Target := Bounded_Slice (Source, Low, High, Drop);>
+@xindent<Equivalent to Target := Bounded_Slice (Source, Low, High);>
 
 !corrigendum A.4.5(11)
 
@@ -827,8 +816,7 @@
 @dinss
 @xcode<   @b<procedure> Set_Unbounded_String
       (Target :    @b<out> Unbounded_String;
-       Source : @b<in>     String;
-       Drop   : @b<in>     Truncation := Error);>
+       Source : @b<in>     String);>
 
 !corrigendum A.4.5(22)
 
@@ -841,16 +829,14 @@
 @xcode<   @b<function> Unbounded_Slice
        (Source : @b<in> Unbounded_String;
         Low    : @b<in> Positive;
-        High   : @b<in> Natural;
-        Drop   : @b<in> Truncation := Error)
+        High   : @b<in> Natural)
            @b<return> Unbounded_String;
 
     @b<procedure> Unbounded_Slice
        (Source : @b<in>     Unbounded_String;
         Target :    @b<out> Unbounded_String;
         Low    : @b<in>     Positive;
-        High   : @b<in>     Natural;
-        Drop   : @b<in>     Truncation := Error);>
+        High   : @b<in>     Natural);>
 
 !corrigendum A.4.5(38)
 
@@ -1399,7 +1385,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---    $Revision: 1.12 $                              --
+--                            $Revision: 1.13 $                              --
 --                                                                          --
 --          Copyright (C) 1992-1998, Free Software Foundation, Inc.         --
 --                                                                          --
@@ -3596,5 +3582,79 @@
 Ada.Strings.Unbounded packages.  The child IO packages for
 Ada.Strings.Unbounded are certainly useful.  I don't see any reason to
 add the Ada.Strings.Bounded packages other than symmetry.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Thursday, October 28, 2004  5:32 PM
+
+I'm forwarding the following comment from comp.lang.ada so it gets handled
+properly:
+
+"Randy Brukardt" wrote in message news:
+> I think it is a typo for the Bounded_Slice and Unbounded_Slice routines;
+> nowhere can I find any description of what it means (the text description of
+> these functions never mentions "Drop"). Nor do any of the meeting minutes
+> that I checked.
+>
+>                 Randy Brukardt
+>                 ARG Editor.
+>
+> "Bj”rn Persson" wrote in message news:
+> Martin Dowie wrote:
+>
+> > Being added in Ada2005, see Ada.Text_IO.Unbounded_IO in
+> > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00301.TXT?rev=1.12
+>
+> Reading that file I see these declarations:
+>
+> procedure Set_Bounded_String
+>     (Target :    out Bounded_String;
+>      Source : in     String;
+>      Drop   : in     Truncation := Error);
+>
+> function Bounded_Slice
+>     (Source : in Bounded_String;
+>      Low    : in Positive;
+>      High   : in Natural;
+>      Drop   : in Truncation := Error)
+>         return Bounded_String;
+>
+> procedure Bounded_Slice
+>     (Source : in     Bounded_String;
+>      Target :    out Bounded_String;
+>      Low    : in     Positive;
+>      High   : in     Natural;
+>      Drop   : in     Truncation := Error);
+>
+> procedure Set_Unbounded_String
+>     (Target :    out Unbounded_String;
+>      Source : in     String;
+>      Drop   : in     Truncation := Error);
+>
+> function Unbounded_Slice
+>     (Source : in Unbounded_String;
+>      Low    : in Positive;
+>      High   : in Natural;
+>      Drop   : in Truncation := Error)
+>         return Unbounded_String;
+>
+> procedure Unbounded_Slice
+>     (Source : in     Unbounded_String;
+>      Target :    out Unbounded_String;
+>      Low    : in     Positive;
+>      High   : in     Natural;
+>      Drop   : in     Truncation := Error);
+>
+> For Set_Bounded_String it is quite obvious that Drop specifies what
+> should happen if Source is longer than the maximum length of Target, but
+> can anyone explain what all the other "Drop" parameters are for?
+>
+> In the case of Bounded_Slice, shouldn't a slice of Source always fit in
+> Target? Aren't they the same type, with the same max length?
+>
+> Unbounded strings are supposed to be unbounded. Their only limit should
+> be the available memory, no? So, are the "Drop" parameters there meant
+> as a way to avoid Storage_Error?
 
 ****************************************************************

Questions? Ask the ACAA Technical Agent