From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=BAYES_00,MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8d3f28f2a74233d2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-12-31 09:11:31 PST Path: supernews.google.com!sn-xit-02!supernews.com!news.infoave.net!arclight.uoregon.edu!news.tufts.edu!blanket.mitre.org!newsfeed.mathworks.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Robert Dewar Newsgroups: comp.lang.ada Subject: Re: Newbie Questions about Get, Get_Line Date: Sun, 31 Dec 2000 17:03:01 GMT Organization: Deja.com Message-ID: <92nos3$cn5$1@nnrp1.deja.com> References: <92l4s4$hjb$1@nnrp1.deja.com> <98pt4t477fqavihkgfbjioo7peo9vb7f20@4ax.com> NNTP-Posting-Host: 205.232.38.14 X-Article-Creation-Date: Sun Dec 31 17:03:01 2000 GMT X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; U) X-Http-Proxy: 1.0 x70.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 X-MyDeja-Info: XMYDJUIDrobert_dewar Xref: supernews.google.com comp.lang.ada:3493 Date: 2000-12-31T17:03:01+00:00 List-Id: 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/