CVS difference for ais/ai-00301.txt

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

--- ais/ai-00301.txt	2003/11/25 22:48:39	1.9
+++ ais/ai-00301.txt	2004/01/23 04:59:26	1.10
@@ -1,5 +1,24 @@
-!standard A.4.5                                     03-11-25  AI95-00301/06
+!standard A.4.3(8)                                   04-01-13  AI95-00301/07
+!standard A.4.3(56)
+!standard A.4.3(58)
+!standard A.4.3(60)
+!standard A.4.4(12)
+!standard A.4.4(28)
+!standard A.4.4(43)
+!standard A.4.4(92)
+!standard A.4.4(101/1)
+!standard A.4.5(11)
+!standard A.4.5(22)
+!standard A.4.5(38)
+!standard A.4.5(79)
+!standard A.4.5(82)
+!standard A.10.1(48)
+!standard A.10.7(17)
+!standard A.10.11(00)
+!standard A.11(03)
 !class amendment 02-06-12
+!status Amendment 200Y 04-01-13
+!status ARG Approved 9-0-2  03-12-12
 !status work item 02-06-12
 !status received 02-06-12
 !priority Medium
@@ -53,158 +72,8 @@
 
 !proposal
 
-Additional Index functions are added to Ada.Strings.Fixed:
+(See wording.)
 
-    function Index (Source : in String;
-                    Pattern : in String;
-                    From : in Positive;
-                    Going : in Direction := Forward;
-                    Mapping : in Maps.Character_Mapping := Maps.Identity)
-                        return Natural;
-    -- If Going = Forward, this is equivalent to
-    --    Index (Source(From..Source'Last), Pattern, Going, Mapping)
-    -- Otherwise, this is equivalent to
-    --    Index (Source(Source'First..From), Pattern, Going, Mapping)
-    -- Index_Error is propagated if From is not in Source'range.
-
-    function Index (Source : in String;
-                    Pattern : in String;
-                    From : in Positive;
-                    Going : in Direction := Forward;
-                    Mapping : in Maps.Character_Mapping_Function) return Natural;
-    -- If Going = Forward, this is equivalent to
-    --    Index (Source(From..Source'Last), Pattern, Going, Mapping)
-    -- Otherwise, this is equivalent to
-    --    Index (Source(Source'First..From), Pattern, Going, Mapping)
-    -- Index_Error is propagated if From is not in Source'range.
-
-    function Index (Source : in String;
-                    Set : in Maps.Character_Set;
-                    From : in Positive;
-                    Test : in Membership := Inside;
-                    Going : in Direction := Forward) return Natural;
-    -- If Going = Forward, this is equivalent to
-    --    Index (Source(From..Source'Last), Set, Test, Going)
-    -- Otherwise, this is equivalent to
-    --    Index (Source(Source'First..From), Set, Test, Going)
-    -- Index_Error is propagated if From is not in Source'range.
-
-    function Index_Non_Blank (Source : in String;
-                              From : in Positive;
-                              Going : in Direction := Forward) return Natural;
-    -- If Going = Forward, this is equivalent to
-    --    Index_Non_Blank (Source(From..Source'Last), Going)
-    -- Otherwise, this is equivalent to
-    --    Index_Non_Blank (Source(Source'First..From), Going)
-    -- Index_Error is propagated if From is not in Source'range.
-
-
-Similar functions are added to Ada.Strings.Bounded and Ada.Strings.Unbounded;
-in these, the Source parameter is a Bounded_String and Unbounded_String,
-respectively.
-
-
-The following operations are added to package Ada.Strings.Bounded:
-
-   procedure Set_Bounded_String
-     (Target :    out Bounded_String;
-      Source : in     String);
-      Drop   : in     Truncation := Error);
-   --  Identical in effect to Target := To_Bounded_String (Source, Drop);
-
-   function Bounded_Slice
-     (Source : in Bounded_String;
-      Low    : in Positive;
-      High   : in Natural;
-      Drop   : in     Truncation := Error)
-     return Unbounded_String;
-   --  Identical to To_Bounded_String (Slice (Source, Low, High), Drop);
-
-   procedure Bounded_Slice
-     (Source : in     Bounded_String;
-      Target :    out Bounded_String;
-      Low    : in     Positive;
-      High   : in     Natural;
-      Drop   : in     Truncation := Error)
-   --  Identical to Target := To_Bounded_String (Slice (Source, Low, High), Drop);
-
-The following operations are added to package Ada.Strings.Unbounded:
-
-   procedure Set_Unbounded_String
-     (Target :    out Unbounded_String;
-      Source : in     String);
-   --  Identical in effect to Target := To_Unbounded_String (Source);
-
-   function Unbounded_Slice
-     (Source : in Unbounded_String;
-      Low    : in Positive;
-      High   : in Natural)
-     return Unbounded_String;
-   --  Identical to To_Unbounded_String (Slice (Source, Low, High));
-
-   procedure Unbounded_Slice
-     (Source : in     Unbounded_String;
-      Target :    out Unbounded_String;
-      Low    : in     Positive;
-      High   : in     Natural);
-   --  Identical to Target := To_Unbounded_String (Slice (Source, Low, High));
-
-
-The following function are added to Text_IO:
-  function Get_Line (File : in File_Type) return String;
-  function Get_Line return String;
-   --  Returns the result of reading characters until the next end of line
-   --  as a string with lower bound 1.
-
-The following child package is defined:
-
-with Ada.Strings.Unbounded;
-package Ada.Text_IO.Unbounded_IO is
-
-  procedure Put
-    (File : in File_Type;
-     Item : in Ada.Strings.Unbounded.Unbounded_String);
-  --  Identical in effect to
-  --    Ada.Text_IO.Put (File, To_String (Item));
-
-  procedure Put
-    (Item : in Ada.Strings.Unbounded.Unbounded_String);
-  --  Identical in effect to
-  --    Ada.Text_IO.Put (To_String (Item));
-
-  procedure Put_Line
-    (File : in Ada.Text_IO.File_Type;
-     Item : in Ada.Strings.Unbounded.Unbounded_String);
-  --  Identical in effect to
-  --    Ada.Text_IO.Put_Line (File, To_String (Item));
-
-  procedure Put_Line
-    (Item : in Ada.Strings.Unbounded.Unbounded_String);
-  --  Identical in effect to
-  --    Ada.Text_IO.Put_Line (To_String (Item));
-
-  function Get_Line
-    (File : in File_Type)
-    return Ada.Strings.Unbounded.Unbounded_String;
-  -- Equivalent to:
-  --     return Ada.Strings.Unbounded.To_Unbounded_String(Text_IO.Get_Line (File));
-
-  function Get_Line
-    return Ada.Strings.Unbounded.Unbounded_String;
-  --  Identical to Get_Line (Ada.Text_IO.Current_Input);
-
-  procedure Get_Line
-    (File : in File_Type; Item : out Ada.Strings.Unbounded.Unbounded_String);
-  -- Equivalent to Item := Get_Line (File);
-
-  procedure Get_Line
-    (Item : out Ada.Strings.Unbounded.Unbounded_String);
-  -- Equivalent to Item := Get_Line;
-
-end Ada.Text_IO.Unbounded_IO;
-
-There is a similar package for Ada.Wide_Text_IO.Wide_Unbounded_IO.
-
 !wording
 
 Add after A.4.3(8):
@@ -214,23 +83,26 @@
                 From : in Positive;
                 Going : in Direction := Forward;
                 Mapping : in Maps.Character_Mapping := Maps.Identity)
-                     return Natural;
+   return Natural;
 
 function Index (Source : in String;
                 Pattern : in String;
                 From : in Positive;
                 Going : in Direction := Forward;
-                Mapping : in Maps.Character_Mapping_Function) return Natural;
+                Mapping : in Maps.Character_Mapping_Function)
+   return Natural;
 
 function Index (Source : in String;
                 Set : in Maps.Character_Set;
                 From : in Positive;
                 Test : in Membership := Inside;
-                Going : in Direction := Forward) return Natural;
+                Going : in Direction := Forward)
+   return Natural;
 
 function Index_Non_Blank (Source : in String;
                           From : in Positive;
-                          Going : in Direction := Forward) return Natural;
+                          Going : in Direction := Forward)
+   return Natural;
 
 
 Add after A.4.3(56):
@@ -240,13 +112,14 @@
                 From : in Positive;
                 Going : in Direction := Forward;
                 Mapping : in Maps.Character_Mapping := Maps.Identity)
-                     return Natural;
+   return Natural;
 
 function Index (Source : in String;
                 Pattern : in String;
                 From : in Positive;
                 Going : in Direction := Forward;
-                Mapping : in Maps.Character_Mapping_Function) return Natural;
+                Mapping : in Maps.Character_Mapping_Function)
+   return Natural;
 
    Each Index function searches, starting from From, for a slice of Source,
    with length Pattern'Length, that matches Pattern with respect to Mapping;
@@ -277,7 +150,8 @@
                 Set : in Maps.Character_Set;
                 From : in Positive;
                 Test : in Membership := Inside;
-                Going : in Direction := Forward) return Natural;
+                Going : in Direction := Forward)
+   return Natural;
 
    Index searches for the first or last occurrence of any of a set of
    characters (when Test=Inside), or any of the complement of a set of
@@ -295,7 +169,8 @@
 
 function Index_Non_Blank (Source : in String;
                           From : in Positive;
-                          Going : in Direction := Forward) return Natural;
+                          Going : in Direction := Forward)
+   return Natural;
 
     Returns Index (Source, Maps.To_Set(Space), From, Outside, Going);
 
@@ -330,23 +205,26 @@
                 From : in Positive;
                 Going : in Direction := Forward;
                 Mapping : in Maps.Character_Mapping := Maps.Identity)
-                     return Natural;
+   return Natural;
 
 function Index (Source : in Bounded_String;
                 Pattern : in String;
                 From : in Positive;
                 Going : in Direction := Forward;
-                Mapping : in Maps.Character_Mapping_Function) return Natural;
+                Mapping : in Maps.Character_Mapping_Function)
+   return Natural;
 
 function Index (Source : in Bounded_String;
                 Set : in Maps.Character_Set;
                 From : in Positive;
                 Test : in Membership := Inside;
-                Going : in Direction := Forward) return Natural;
+                Going : in Direction := Forward)
+   return Natural;
 
 function Index_Non_Blank (Source : in Bounded_String;
                           From : in Positive;
-                          Going : in Direction := Forward) return Natural;
+                          Going : in Direction := Forward)
+   return Natural;
 
 Add after A.4.4(92):
 
@@ -375,9 +253,9 @@
     Target :    out Bounded_String;
     Low    : in     Positive;
     High   : in     Natural;
-    Drop   : in     Truncation := Error)
+    Drop   : in     Truncation := Error);
 
-    Equivalent to Target := Bounded_Slice (Soruce, Low, High, Drop);
+    Equivalent to Target := Bounded_Slice (Source, Low, High, Drop);
 
 Add after A.4.5(11):
 
@@ -400,7 +278,7 @@
     Target :    out Unbounded_String;
     Low    : in     Positive;
     High   : in     Natural;
-    Drop   : in     Truncation := Error)
+    Drop   : in     Truncation := Error);
 
 Add after A.4.5(38):
 
@@ -409,23 +287,26 @@
                 From : in Positive;
                 Going : in Direction := Forward;
                 Mapping : in Maps.Character_Mapping := Maps.Identity)
-                     return Natural;
+   return Natural;
 
 function Index (Source : in Unbounded_String;
                 Pattern : in String;
                 From : in Positive;
                 Going : in Direction := Forward;
-                Mapping : in Maps.Character_Mapping_Function) return Natural;
+                Mapping : in Maps.Character_Mapping_Function)
+   return Natural;
 
 function Index (Source : in Unbounded_String;
                 Set : in Maps.Character_Set;
                 From : in Positive;
                 Test : in Membership := Inside;
-                Going : in Direction := Forward) return Natural;
+                Going : in Direction := Forward)
+   return Natural;
 
 function Index_Non_Blank (Source : in Unbounded_String;
                           From : in Positive;
-                          Going : in Direction := Forward) return Natural;
+                          Going : in Direction := Forward)
+   return Natural;
 
 Add after A.4.5(79):
 
@@ -452,8 +333,8 @@
 
    Returns a result string constructed by reading successive characters from
    the specified input file, and assigning them to successive characters of the
-   result string. The result string has a lower bound 1 and an upper bound of
-   the number of characters read. Reading stops when the end of the line is
+   result string. The result string has a lower bound of 1 and an upper bound
+   of the number of characters read. Reading stops when the end of the line is
    met; Skip_Line is then (in effect) called with a spacing of 1.
 
    The exception End_Error is propagated if an attempt is made to skip a file
@@ -526,12 +407,12 @@
 
 function Get_Line
   (File : in File_Type)
-  return Strings.Unbounded.Unbounded_String;
+   return Strings.Unbounded.Unbounded_String;
 
    Returns Strings.Unbounded.To_Unbounded_String(Text_IO.Get_Line(File));
 
 function Get_Line
-  return Strings.Unbounded.Unbounded_String;
+   return Strings.Unbounded.Unbounded_String;
 
    Returns Strings.Unbounded.To_Unbounded_String(Text_IO.Get_Line);
 
@@ -548,14 +429,14 @@
 Add after A.11(3):
 
 The specification of package Wide_Text_IO.Wide_Unbounded_IO is the same as
-that for Text_IO.Unbounded_IO, exception that any occurrence of Unbounded_String
+that for Text_IO.Unbounded_IO, except that any occurrence of Unbounded_String
 is replaced by Wide_Unbounded_String, and any occurrence of package Unbounded
 is replaced by Wide_Unbounded.
 
 !discussion
 
 Ada.Strings.Unbounded was not really intended to be a complete abstraction.
-Rather, it was designed to provide a convinient storage representation
+Rather, it was designed to provide a convenient storage representation
 mechanism for strings. Even so, it is a bad idea to have to use multiple
 string packages in a single expression, and many common operations require
 that.
@@ -667,11 +548,10 @@
       else
          From := From + 1;
       end if;
-      declare
    end loop;
 end;
 
-This incurs quite some extra storage overhead because the (necessary!) call
+This incurs quite a lot of extra storage overhead because the (necessary!) call
 to Slice is required to return a copy of the slice of Source.Reference.
 With the proposed new Index functions, this could be simplified to:
 
@@ -702,6 +582,442 @@
    Ada.Strings.Unbounded.Text_IO (My_Unbounded_String);
 
 
+!corrigendum A.4.3(8)
+
+@dinsa
+@xcode<-- @ft<@i<Search subprograms>>>
+@dinss
+@xcode<   @b<function> Index (Source : @b<in> String;
+                   Pattern : @b<in> String;
+                   From : @b<in> Positive;
+                   Going : @b<in> Direction := Forward;
+                   Mapping : @b<in> Maps.Character_Mapping := Maps.Identity)
+      @b<return> Natural;
+
+   @b<function> Index (Source : @b<in> String;
+                   Pattern : @b<in> String;
+                   From : @b<in> Positive;
+                   Going : @b<in> Direction := Forward;
+                   Mapping : @b<in> Maps.Character_Mapping_Function)
+      @b<return> Natural;
+
+   @b<function> Index (Source : @b<in> String;
+                   Set : @b<in> Maps.Character_Set;
+                   From : @b<in> Positive;
+                   Test : @b<in> Membership := Inside;
+                   Going : @b<in> Direction := Forward)
+      @b<return> Natural;
+
+   @b<function> Index_Non_Blank (Source : @b<in> String;
+                             From : @b<in> Positive;
+                             Going : @b<in> Direction := Forward)
+      @b<return> Natural;>
+
+!corrigendum A.4.3(56)
+
+@dinsa
+@xinbull<Otherwise, Length_Error is propagated.>
+@dinss
+@xcode<@b<function> Index (Source : @b<in> String;
+                Pattern : @b<in> String;
+                From : @b<in> Positive;
+                Going : @b<in> Direction := Forward;
+                Mapping : @b<in> Maps.Character_Mapping := Maps.Identity)
+   @b<return> Natural;
+
+@b<function> Index (Source : @b<in> String;
+                Pattern : @b<in> String;
+                From : @b<in> Positive;
+                Going : @b<in> Direction := Forward;
+                Mapping : @b<in> Maps.Character_Mapping_Function)
+   @b<return> Natural;>
+
+@xindent<Each Index function searches, starting from From, for a slice of
+Source, with length Pattern'Length, that matches Pattern with respect to
+Mapping; the parameter Going indicates the direction of the lookup. If Going =
+Forward, then Index returns the smallest index I which is greater than or equal
+to From such that the slice of Source starting at I matches Pattern. If Going =
+Backward, then Index returns the largest index I such that the slice of Source
+starting at I matches Pattern and has an upper bound less than or equal to
+From. If there is no such slice, then 0 is returned. If Pattern is the null
+string then Pattern_Error is propagated.>
+
+!corrigendum A.4.3(58)
+
+@drepl
+@xindent<Each Index function searches for a slice of Source, with length
+Pattern'Length, that matches Pattern with respect to Mapping; the parameter
+Going indicates the direction of the lookup. If Going = Forward, then Index
+returns the smallest index I such that the slice of Source starting at I
+matches Pattern. If Going = Backward, then Index returns the largest index I
+such that the slice of Source starting at I matches Pattern. If there is no
+such slice, then 0 is returned. If Pattern is the null string then
+Pattern_Error is propagated.>
+@dby
+@xindent<If Going = Forward, returns>
+@xcode<      Index (Source, Pattern, Source'First, Forward, Mapping);>
+@xindent<otherwise returns>
+@xcode<      Index (Source, Pattern, Source'Last, Backward, Mapping);>
+
+@xcode<@b<function> Index (Source : @b<in> String;
+                Set : @b<in> Maps.Character_Set;
+                From : @b<in> Positive;
+                Test : @b<in> Membership := Inside;
+                Going : @b<in> Direction := Forward)
+   @b<return> Natural;>
+
+@xindent<Index searches for the first or last occurrence of any of a set of
+characters (when Test=Inside), or any of the complement of a set of characters
+(when Test=Outside). It returns the smallest index I @>= From (if
+Going=Forward) or the largest index I <= From (if Going=Backward) such that
+Source(I) satisfies the Test condition with respect to Set; it returns 0 if
+there is no such Character in Source.>
+
+!corrigendum A.4.3(60)
+
+@drepl
+@xindent<Index searches for the first or last occurrence of any of a set of
+characters (when Test=Inside), or any of the complement of a set of characters
+(when Test=Outside). It returns the smallest index I (if Going=Forward) or the
+largest index I (if Going=Backward) such that Source(I) satisfies the Test
+condition with respect to Set; it returns 0 if there is no such Character in
+Source.>
+@dby
+@xindent<If Going = Forward, returns>
+@xcode<      Index (Source, Set, Source'First, Test, Forward);>
+@xindent<otherwise returns>
+@xcode<   Index (Source, Set, Source'Last, Test, Backward);>
+
+@xcode<@b<function> Index_Non_Blank (Source : @b<in> String;
+                          From : @b<in> Positive;
+                          Going : @b<in> Direction := Forward)
+   @b<return> Natural;>
+
+@xindent<Returns Index (Source, Maps.To_Set(Space), From, Outside, Going);>
+
+
+!corrigendum A.4.4(12)
+
+@dinsa
+@xcode<@b<function> To_String (Source : @b<in> Bounded_String) @b<return> String;>
+@dinss
+@xcode<      @b<procedure> Set_Bounded_String
+         (Target :    @b<out> Bounded_String;
+          Source : @b<in>     String);
+          Drop   : @b<in>     Truncation := Error);>
+
+!corrigendum A.4.4(28)
+
+@dinsa
+@xcode<      @b<function> Slice (Source : @b<in> Bounded_String;
+                      Low    : @b<in> Positive;
+                      High   : @b<in> Natural)
+         @b<return> String;>
+@dinss
+@xcode<      @b<function> Bounded_Slice
+         (Source : @b<in> Bounded_String;
+          Low    : @b<in> Positive;
+          High   : @b<in> Natural;
+          Drop   : @b<in> Truncation := Error)
+             @b<return> Unbounded_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);>
+
+!corrigendum A.4.4(43)
+
+@dinsa
+@xcode<   -- @ft<@i<Search subprograms>>>
+@dinss
+@xcode<      @b<function> Index (Source : @b<in> Bounded_String;
+                      Pattern : @b<in> String;
+                      From : @b<in> Positive;
+                      Going : @b<in> Direction := Forward;
+                      Mapping : @b<in> Maps.Character_Mapping := Maps.Identity)
+         @b<return> Natural;
+
+      @b<function> Index (Source : @b<in> Bounded_String;
+                      Pattern : @b<in> String;
+                      From : @b<in> Positive;
+                      Going : @b<in> Direction := Forward;
+                      Mapping : @b<in> Maps.Character_Mapping_Function)
+         @b<return> Natural;
+
+      @b<function> Index (Source : @b<in> Bounded_String;
+                      Set : @b<in> Maps.Character_Set;
+                      From : @b<in> Positive;
+                      Test : @b<in> Membership := Inside;
+                      Going : @b<in> Direction := Forward)
+         @b<return> Natural;
+
+      @b<function> Index_Non_Blank (Source : @b<in> Bounded_String;
+                                From : @b<in> Positive;
+                                Going : @b<in> Direction := Forward)
+         @b<return> Natural;>
+
+!corrigendum A.4.4(92)
+
+@dinsa
+To_String returns the String value with lower bound 1 represented by Source. If
+B is a Bounded_String, then B = To_Bounded_String(To_String(B)).
+@dinss
+@xcode<@b<procedure> Set_Bounded_String
+   (Target :    @b<out> Bounded_String;
+    Source : @b<in>     String);
+    Drop   : @b<in>     Truncation := Error);>
+
+@xindent<Equivalent to Target := To_Bounded_String (Source, Drop);>
+
+!corrigendum A.4.4(101/1)
+
+@dinsa
+@xindent<Returns the slice at positions Low through High in the string
+represented by Source; propagates Index_Error if Low @> Length(Source)+1 or
+High @> Length(Source).>
+@dinss
+@xcode<@b<function> Bounded_Slice
+   (Source : @b<in> Bounded_String;
+    Low    : @b<in> Positive;
+    High   : @b<in> Natural;
+    Drop   : @b<in> Truncation := Error)
+       @b<return> Bounded_String;>
+
+@xindent<Returns the slice at positions Low through High in the string
+represented by Source as a bounded string; propagates Index_Error if Low @>
+Length(Source)+1 or High @> Length(Source).>
+
+@xcode<@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);>
+
+@xindent<Equivalent to Target := Bounded_Slice (Source, Low, High, Drop);>
+
+!corrigendum A.4.5(11)
+
+@dinsa
+@xcode<   @b<function> To_String (Source : @b<in> Unbounded_String) @b<return> String;>
+@dinss
+@xcode<   @b<procedure> Set_Unbounded_String
+      (Target :    @b<out> Unbounded_String;
+       Source : @b<in>     String);
+       Drop   : @b<in>     Truncation := Error);>
+
+!corrigendum A.4.5(22)
+
+@dinsa
+@xcode<   @b<function> Slice (Source : @b<in> Unbounded_String;
+                   Low    : @b<in> Positive;
+                   High   : @b<in> Natural)
+      @b<return> String;>
+@dinss
+@xcode<   @b<function> Unbounded_Slice
+       (Source : @b<in> Unbounded_String;
+        Low    : @b<in> Positive;
+        High   : @b<in> Natural;
+        Drop   : @b<in> Truncation := Error)
+           @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);>
+
+!corrigendum A.4.5(38)
+
+@dinsa
+@xcode<-- @ft<@i<Search subprograms>>>
+@dinss
+@xcode<   @b<function> Index (Source : @b<in> Unbounded_String;
+                   Pattern : @b<in> String;
+                   From : @b<in> Positive;
+                   Going : @b<in> Direction := Forward;
+                   Mapping : @b<in> Maps.Character_Mapping := Maps.Identity)
+      @b<return> Natural;
+
+   @b<function> Index (Source : @b<in> Unbounded_String;
+                   Pattern : @b<in> String;
+                   From : @b<in> Positive;
+                   Going : @b<in> Direction := Forward;
+                   Mapping : @b<in> Maps.Character_Mapping_Function)
+      @b<return> Natural;
+
+   @b<function> Index (Source : @b<in> Unbounded_String;
+                   Set : @b<in> Maps.Character_Set;
+                   From : @b<in> Positive;
+                   Test : @b<in> Membership := Inside;
+                   Going : @b<in> Direction := Forward)
+      @b<return> Natural;
+
+   @b<function> Index_Non_Blank (Source : @b<in> Unbounded_String;
+                             From : @b<in> Positive;
+                             Going : @b<in> Direction := Forward)
+      @b<return> Natural;>
+
+!corrigendum A.4.5(79)
+
+@dinsa
+@xbullet<If U is an Unbounded_String, then To_Unbounded_String(To_String(U)) = U.>
+@dinst
+The procedure Set_Unbounded_String set Target to an Unbounded_String that
+represents Source.
+
+!corrigendum A.4.5(82)
+
+@dinsa
+The Element, Replace_Element, and Slice subprograms have the same effect as the
+corresponding bounded-length string subprograms.
+@dinst
+The function Unbounded_Slice returns the slice at positions Low through High in
+the string represented by Source as a Unbounded_String. The procedure
+Unbounded_Slice sets Target to the Unbounded_String representing the slice at
+positions Low through High in the string represented by Source. Both routines
+propagate Index_Error if Low @> Length(Source)+1 or High @> Length(Source).
+
+!corrigendum A.10.1(48)
+
+@dinsa
+@xcode<   @b<procedure> Put(File : @b<in>  File_Type; Item : @b<in> String);
+   @b<procedure> Put(Item : @b<in>  String);>
+@dinss
+@xcode<   @b<function> Get_Line(File : @b<in>  File_Type) @b<return> String;
+   @b<function> Get_Line @b<return> String;>
+
+!corrigendum A.10.7(13)
+
+@drepl
+For an item of type String, the following procedures are provided:
+@dby
+For an item of type String, the following subprograms are provided:
+
+!corrigendum A.10.7(17)
+
+@dinsa
+@xindent<Determines the length of the given string and attempts that number of
+Put operations for successive characters of the string (in particular, no
+operation is performed if the string is null).>
+@dinss
+@xcode<@b<function> Get_Line(File : @b<in>  File_Type) @b<return> String;
+@b<function> Get_Line @b<return> String;>
+
+@xindent<Returns a result string constructed by reading successive characters
+from the specified input file, and assigning them to successive characters of
+the result string. The result string has a lower bound of 1 and an upper bound
+of the number of characters read. Reading stops when the end of the line is
+met; Skip_Line is then (in effect) called with a spacing of 1.>
+
+@xindent<The exception End_Error is propagated if an attempt is made to skip
+a file terminator.>
+
+!corrigendum A.10.11(01)
+
+@dinsc
+
+The package Text_IO.Unbounded_IO provides input-output in human-readable form
+for Unbounded_Strings.
+
+@i<@s8<Static Semantics>>
+
+The library package Text_IO.Unbounded_IO has the following declaration:
+
+@xcode<@b<with> Ada.Strings.Unbounded;
+@b<package> Ada.Text_IO.Unbounded_IO @b<is>
+
+   @b<procedure> Put
+      (File : @b<in> File_Type;
+       Item : @b<in> Strings.Unbounded.Unbounded_String);
+
+   @b<procedure> Put
+      (Item : @b<in> Strings.Unbounded.Unbounded_String);
+
+   @b<procedure> Put_Line
+      (File : @b<in> Text_IO.File_Type;
+       Item : @b<in> Strings.Unbounded.Unbounded_String);
+
+   @b<procedure> Put_Line
+      (Item : @b<in> Strings.Unbounded.Unbounded_String);
+
+   @b<function> Get_Line
+      (File : @b<in> File_Type)
+      @b<return> Strings.Unbounded.Unbounded_String;
+
+   @b<function> Get_Line
+      @b<return> Strings.Unbounded.Unbounded_String;
+
+   @b<procedure> Get_Line
+      (File : @b<in> File_Type; Item : @b<out> Strings.Unbounded.Unbounded_String);
+
+   @b<procedure> Get_Line
+      (Item : @b<out> Strings.Unbounded.Unbounded_String);
+
+@b<end> Ada.Text_IO.Unbounded_IO;>
+
+For an item of type Unbounded_String, the following subprograms are provided:
+
+@xcode<@b<procedure> Put
+   (File : @b<in> File_Type;
+    Item : @b<in> Strings.Unbounded.Unbounded_String);>
+
+@xindent<Equivalent to Text_IO.Put (File, Strings.Unbounded.To_String(Item));>
+
+@xcode<@b<procedure> Put
+   (Item : @b<in> Strings.Unbounded.Unbounded_String);>
+
+@xindent<Equivalent to Text_IO.Put (Strings.Unbounded.To_String(Item));>
+
+@xcode<@b<procedure> Put_Line
+   (File : @b<in> Text_IO.File_Type;
+    Item : @b<in> Strings.Unbounded.Unbounded_String);>
+
+@xindent<Equivalent to Text_IO.Put_Line (File, Strings.Unbounded.To_String(Item));>
+
+@xcode<@b<procedure> Put_Line
+   (Item : @b<in> Strings.Unbounded.Unbounded_String);>
+
+@xindent<Equivalent to Text_IO.Put_Line (Strings.Unbounded.To_String(Item));>
+
+@xcode<@b<function> Get_Line
+   (File : @b<in> File_Type)
+   @b<return> Strings.Unbounded.Unbounded_String;>
+
+@xindent<Returns Strings.Unbounded.To_Unbounded_String(Text_IO.Get_Line(File));>
+
+@xcode<@b<function> Get_Line
+   @b<return> Strings.Unbounded.Unbounded_String;>
+
+@xindent<Returns Strings.Unbounded.To_Unbounded_String(Text_IO.Get_Line);>
+
+@xcode<@b<procedure> Get_Line
+   (File : @b<in> File_Type; Item : @b<out> Strings.Unbounded.Unbounded_String);>
+
+@xindent<Equivalent to Item := Get_Line (File);>
+
+@xcode<@b<procedure> Get_Line
+   (Item : @b<out> Strings.Unbounded.Unbounded_String);>
+
+@xindent<Equivalent to Item := Get_Line;>
+
+!corrigendum A.11(3)
+
+@dinsa
+Nongeneric equivalents of Wide_Text_IO.Integer_IO and Wide_Text_IO.Float_IO are
+provided (as for Text_IO) for each predefined numeric type, with names such as
+Ada.Integer_Wide_Text_IO, Ada.Long_Integer_Wide_Text_IO,
+Ada.Float_Wide_Text_IO, Ada.Long_Float_Wide_Text_IO.
+@dinst
+The specification of package Wide_Text_IO.Wide_Unbounded_IO is the same as
+that for Text_IO.Unbounded_IO, except that any occurrence of Unbounded_String
+is replaced by Wide_Unbounded_String, and any occurrence of package Unbounded
+is replaced by Wide_Unbounded.
+
 !ACATS test
 
 Tests should be created to check on the implementation of this feature.
@@ -1062,7 +1378,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---    $Revision: 1.9 $                              --
+--                            $Revision: 1.10 $                              --
 --                                                                          --
 --          Copyright (C) 1992-1998, Free Software Foundation, Inc.         --
 --                                                                          --

Questions? Ask the ACAA Technical Agent