Get_Line

(Ristras de tamaño limitado)

Librería

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

Sintaxis y explicación

function Get_Line[(File : in File_Type)] return Bounded.Bounded_String;
procedure Get_Line ([File : in File_Type; ]Item : out Bounded.Bounded_String);

Ejemplo

with Ada.Strings.Bounded, Ada.Text_IO.Bounded_IO;
...
package String20 is new Ada.Strings.Bounded.Generic_Bounded_Length (20);
package String20_IO is new Ada.Text_IO.Bounded_IO (String20);
...
S1, S2: String20.Bounded_String;
...
S1 := String20_IO.Get_Line;
String20_IO.Get_Line (S2);

with Ada.Strings.Bounded, Ada.Text_IO, Ada.Text_IO.Bounded_IO;
...
package String20 is new Ada.Strings.Bounded.Generic_Bounded_Length (20);
package String20_IO is new Ada.Text_IO.Bounded_IO (String20);
...
S1, S2: String20.Bounded_String;
F     : Text_IO.File_Type;
...
S1 := String20_IO.Get_Line (F);  
String20_IO.Get_Line (F, S2);

Véase