Руководство по Ada (Ada 2022)
A.10.11 Ввод-вывод для ограниченных строк
Пакет Text_IO.Bounded_IO предоставляет ввод-вывод в удобочитаемой форме для Bounded_Strings.
Статическая семантика
Указанный ниже пакет-библиотека Text_IO.Bounded_IO имеет следующее объявление:
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
generic
with package Bounded is
new Ada.Strings.Bounded.Generic_Bounded_Length (<>);
package Ada.Text_IO.Bounded_IO
with Global => in out synchronized is
procedure Put
(File : in File_Type;
Item : in Bounded.Bounded_String);
(File : in File_Type;
Item : in Bounded.Bounded_String);
procedure Put
(Item : in Bounded.Bounded_String);
(Item : in Bounded.Bounded_String);
procedure Put_Line
(File : in File_Type;
Item : in Bounded.Bounded_String);
(File : in File_Type;
Item : in Bounded.Bounded_String);
procedure Put_Line
(Item : in Bounded.Bounded_String);
(Item : in Bounded.Bounded_String);
function Get_Line
(File : in File_Type)
return Bounded.Bounded_String;
(File : in File_Type)
return Bounded.Bounded_String;
function Get_Line
return Bounded.Bounded_String;
return Bounded.Bounded_String;
procedure Get_Line
(File : in File_Type; Item : out Bounded.Bounded_String);
(File : in File_Type; Item : out Bounded.Bounded_String);
procedure Get_Line
(Item : out Bounded.Bounded_String);
(Item : out Bounded.Bounded_String);
end Ada.Text_IO.Bounded_IO;
Для элемента типа Bounded_String предоставляются следующие подпрограммы:
procedure Put
(File : in File_Type;
Item : in Bounded.Bounded_String);
(File : in File_Type;
Item : in Bounded.Bounded_String);
Эквивалентно Text_IO.Put (File, Bounded.To_String(Item));
procedure Put
(Item : in Bounded.Bounded_String);
(Item : in Bounded.Bounded_String);
Эквивалентно Text_IO.Put (Bounded.To_String(Item));
procedure Put_Line
(File : in File_Type;
Item : in Bounded.Bounded_String);
(File : in File_Type;
Item : in Bounded.Bounded_String);
Эквивалентно Text_IO.Put_Line (File, Bounded.To_String(Item));
procedure Put_Line
(Item : in Bounded.Bounded_String);
(Item : in Bounded.Bounded_String);
Эквивалентно Text_IO.Put_Line (Bounded.To_String(Item));
function Get_Line
(File : in File_Type)
return Bounded.Bounded_String;
(File : in File_Type)
return Bounded.Bounded_String;
Возвращает Bounded.To_Bounded_String(Text_IO.Get_Line(File));
function Get_Line
return Bounded.Bounded_String;
return Bounded.Bounded_String;
Возвращает Bounded.To_Bounded_String(Text_IO.Get_Line);
procedure Get_Line
(File : in File_Type; Item : out Bounded.Bounded_String);
(File : in File_Type; Item : out Bounded.Bounded_String);
Эквивалентно Item := Get_Line (File);
procedure Get_Line
(Item : out Bounded.Bounded_String);
(Item : out Bounded.Bounded_String);
Эквивалентно Item := Get_Line;