Ada Reference Manual (Ada 2022)Legal Information
Contents   Index   References   Search   Previous   Next 

A.10.11 Input-Output for Bounded Strings

1/2
The package Text_IO.Bounded_IO provides input-output in human-readable form for Bounded_Strings. 

Static Semantics

2/2
The generic library package Text_IO.Bounded_IO has the following declaration:
3/5
with Ada.Strings.Bounded;
generic
   with package Bounded is
                     new Ada.Strings.Bounded.Generic_Bounded_Length (<>);
package Ada.Text_IO.Bounded_IO
   with Global => in out synchronized is
4/2
   procedure Put
      (File : in File_Type;
       Item : in Bounded.Bounded_String);
5/2
   procedure Put
      (Item : in Bounded.Bounded_String);
6/2
   procedure Put_Line
      (File : in File_Type;
       Item : in Bounded.Bounded_String);
7/2
   procedure Put_Line
      (Item : in Bounded.Bounded_String);
8/2
   function Get_Line
      (File : in File_Type)
      return Bounded.Bounded_String;
9/2
   function Get_Line
      return Bounded.Bounded_String;
10/2
   procedure Get_Line
      (File : in File_Type; Item : out Bounded.Bounded_String);
11/2
   procedure Get_Line
      (Item : out Bounded.Bounded_String);
12/2
end Ada.Text_IO.Bounded_IO;
13/2
For an item of type Bounded_String, the following subprograms are provided:
14/2
procedure Put
   (File : in File_Type;
    Item : in Bounded.Bounded_String);
15/2
Equivalent to Text_IO.Put (File, Bounded.To_String(Item));
16/2
procedure Put
   (Item : in Bounded.Bounded_String);
17/2
Equivalent to Text_IO.Put (Bounded.To_String(Item));
18/2
procedure Put_Line
   (File : in File_Type;
    Item : in Bounded.Bounded_String);
19/2
Equivalent to Text_IO.Put_Line (File, Bounded.To_String(Item));
20/2
procedure Put_Line
   (Item : in Bounded.Bounded_String);
21/2
Equivalent to Text_IO.Put_Line (Bounded.To_String(Item));
22/2
function Get_Line
   (File : in File_Type)
   return Bounded.Bounded_String;
23/2
Returns Bounded.To_Bounded_String(Text_IO.Get_Line(File));
24/2
function Get_Line
   return Bounded.Bounded_String;
25/2
Returns Bounded.To_Bounded_String(Text_IO.Get_Line);
26/2
procedure Get_Line
   (File : in File_Type; Item : out Bounded.Bounded_String);
27/2
Equivalent to Item := Get_Line (File);
28/2
procedure Get_Line
   (Item : out Bounded.Bounded_String);
29/2
Equivalent to Item := Get_Line; 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe