comp.lang.ada
 help / color / mirror / Atom feed
From: Robert Dewar <robert_dewar@my-deja.com>
Subject: Re: Newbie Questions about Get, Get_Line
Date: Sun, 31 Dec 2000 17:03:01 GMT
Date: 2000-12-31T17:03:01+00:00	[thread overview]
Message-ID: <92nos3$cn5$1@nnrp1.deja.com> (raw)
In-Reply-To: 98pt4t477fqavihkgfbjioo7peo9vb7f20@4ax.com

In article <98pt4t477fqavihkgfbjioo7peo9vb7f20@4ax.com>,
  gressett@iglobal.net wrote:
> The real problem here is that the designers of the
Ada.Text_IO package
> quit too soon. There should have been an Ada.Interactive_IO
which
> would deal with more of the problems of screen and Keyboard
IO in a
> standard way.


Perhaps, but the problem in this thread is trivially solvable
with the current Text_IO facilities, so I don't think this is
a good argument for the point.

Now if you are using Unbounded strings, then there really
are missing routines, which is why GNAT supplies:

with Ada.Text_IO;

package Ada.Strings.Unbounded.Text_IO is

   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.

end Ada.Strings.Unbounded.Text_IO;


Sent via Deja.com
http://www.deja.com/



  parent reply	other threads:[~2000-12-31 17:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-30  7:33 Newbie Questions about Get, Get_Line gressett
2000-12-30 14:13 ` Marin David Condic
2000-12-30 17:17   ` Ted Dennison
2000-12-30 17:25     ` Ted Dennison
2000-12-30 22:46     ` Marin David Condic
2000-12-30 23:12       ` Ted Dennison
2000-12-30 14:31 ` Jeff Creem
2000-12-30 17:09 ` Ted Dennison
2000-12-31  8:13   ` gressett
2000-12-31 15:50     ` Larry Kilgallen
2000-12-31 17:03     ` Robert Dewar [this message]
2000-12-31 17:47     ` Ted Dennison
2000-12-31 21:07     ` tmoran
2001-01-01  6:12       ` gressett
2001-01-01 17:45         ` Robert Dewar
2001-01-01 17:46         ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox