On this page
Ada.Text_IO.Unbounded_IO
Text_IO of Unbounded_String values (RM A.10.12).
Read the family guide for representation, selection and resource rules. The complete declaration page retains exact signatures/contracts; the source specification is the implementation baseline.
Availability and ownership
All of RM A.10.12, through Text_IO's String forms and their contracts.
A client proof uses these contracts without proving the body again (see library assurance). Global => null excludes package-global effects, not changes made through an in out argument.
Import and instantiate
with Ada.Text_IO.Unbounded_IO;import Ada.Text_IO.Unbounded_IO;
A Vibe module imports this unit's names with from Ada.Text_IO.Unbounded_IO import Name; see library use across syntaxes. In Varc, keep each name's declared spelling and write & on arguments the call changes.
Contract and lifecycle reading
A Pre condition is the caller's obligation; a Post is what a normal return guarantees. What a postcondition does not state, a client cannot assume. Ghost functions are for contracts and ghost code. The family guide describes copying, lifetime, order and cost.
API 001
Put (declaration) — Text_IO's Put of the string's characters to File.
Declared interface:
procedure Put (File : File_Type; Item : Strings.Unbounded.Unbounded_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);API 002
Put (declaration) — Text_IO's Put to the current output.
Declared interface:
procedure Put (Item : Strings.Unbounded.Unbounded_String)
with Global => (In_Out => File_System);API 003
Put_Line (declaration) — Text_IO's Put_Line to File.
Declared interface:
procedure Put_Line (File : File_Type; Item : Strings.Unbounded.Unbounded_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);API 004
Put_Line (declaration) — Text_IO's Put_Line to the current output.
Declared interface:
procedure Put_Line (Item : Strings.Unbounded.Unbounded_String)
with Global => (In_Out => File_System);API 005
Get_Line (declaration) — The next line of File, of any length (a function with side effects).
Declared interface:
function Get_Line (File : File_Type) return Strings.Unbounded.Unbounded_String
with Side_Effects, Pre => Is_Open (File) and then Mode (File) = In_File and then not End_Of_File (File),
Global => (In_Out => File_System);API 006
Get_Line (declaration) — The next line of the current input.
Declared interface:
function Get_Line return Strings.Unbounded.Unbounded_String
with Side_Effects, Pre => not End_Of_File, Global => (In_Out => File_System);API 007
Get_Line (declaration) — Item takes the next line of File.
Declared interface:
procedure Get_Line (File : File_Type; Item : out Strings.Unbounded.Unbounded_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);API 008
Get_Line (declaration) — Item takes the next line of the current input.
Declared interface:
procedure Get_Line (Item : out Strings.Unbounded.Unbounded_String)
with Pre => not End_Of_File,
Global => (In_Out => File_System);