DEVELOPMENT EDITION · 769442725406
Library Reference
On this page

Generic package Ada.Text_IO.Bounded_IO

Ada.Text_IO.Bounded_IO (RM A.10.11): Text_IO's Put, Put_Line and Get_Line of an instance's Bounded_String values, with Text_IO's contracts for the String forms. Get_Line of a line longer than the bound raises Ada.Strings.Length_Error, as the RM's To_Bounded_String does; so Get_Line is the procedure only, as a Verada function propagates no exception.

generic
   with package Bounded is new Ada.Strings.Bounded.Generic_Bounded_Length (<>);

Put

procedure Put (File : File_Type; Item : Bounded.Bounded_String)
  with Global => (In_Out => File_System),
       Exceptional_Cases => (Status_Error => not Is_Open (File),
                             Mode_Error => Is_Open (File) and then Mode (File) = In_File);

Put

procedure Put (Item : Bounded.Bounded_String)
  with Global => (In_Out => File_System);

Put_Line

procedure Put_Line (File : File_Type; Item : Bounded.Bounded_String)
  with Global => (In_Out => File_System),
       Exceptional_Cases => (Status_Error => not Is_Open (File),
                             Mode_Error => Is_Open (File) and then Mode (File) = In_File);

Put_Line

procedure Put_Line (Item : Bounded.Bounded_String)
  with Global => (In_Out => File_System);

Get_Line

procedure Get_Line (File : File_Type; Item : out Bounded.Bounded_String)
  with Pre => (if Is_Open (File) and then Mode (File) = In_File then not End_Of_File (File)),
       Global => (In_Out => File_System),
       Exceptional_Cases => (Status_Error => not Is_Open (File),
                             Mode_Error => Is_Open (File) and then Mode (File) /= In_File,
                             Ada.Strings.Length_Error => True);

Get_Line

procedure Get_Line (Item : out Bounded.Bounded_String)
  with Pre => not End_Of_File,
       Global => (In_Out => File_System),
       Exceptional_Cases => (Ada.Strings.Length_Error => True);