411 REFERENCE · Wikibooks
Ada Programming/Libraries/Ada.Strings.Unbounded.Text IO
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Libraries Ada.Strings.Unbounded.Text_IO
__TOC__
Ada Strings Unbounded Text_IO is a GNAT implementation-defined package that offers Get_Line and Put_Line functions which work directly on unbounded strings. They are more efficient and easier to use than the standard Ada Text_IO functions.
function Get_Line return Unbounded_String;
function Get_Line (File : Ada Text_IO.File_Type) return Unbounded_String;
Reads up to the end of the current line, returning the result as an unbounded string of appropriate length. If no File parameter is present, input is from Current_Input.
procedure Put (U : Unbounded_String);
procedure Put (File : Ada Text_IO.File_Type; U : Unbounded_String);
procedure Put_Line (U : Unbounded_String);
procedure Put_Line (File : Ada Text_IO.File_Type; U : Unbounded_String);
These are equivalent to the standard Text_IO routines passed the value To_String (U), but operate more efficiently, because the extra copy of the argument is avoided.
In Ada 2005 the standard equivalent to this package is Ada Text_IO Unbounded_IO.
See also
Wikibook
Ada Programming
Ada Programming/Libraries
Ada Programming/Libraries/Ada
Ada Programming/Libraries/Ada.Strings
Ada Programming/Libraries/Ada.Strings.Unbounded
Ada Programming/Libraries/Ada.Text_IO
Ada Programming/Libraries/Ada.Text_IO.Unbounded_IO
Ada Programming/Input Output
Ada Reference Manual
A 10 1 The Package Text_IO
A 4 5 Unbounded-Length String Handling