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-30 09:30:09 PST Path: supernews.google.com!sn-xit-02!supernews.com!216.218.236.179.MISMATCH!news!news.he.net!newspeer.monmouth.com!news.maxwell.syr.edu!nntp2.deja.com!nnrp1.deja.com!not-for-mail From: Ted Dennison Newsgroups: comp.lang.ada Subject: Re: Newbie Questions about Get, Get_Line Date: Sat, 30 Dec 2000 17:17:38 GMT Organization: Deja.com Message-ID: <92l5bf$i0p$1@nnrp1.deja.com> References: <3A4DED82.C23CDB77@acm.org> NNTP-Posting-Host: 204.48.27.130 X-Article-Creation-Date: Sat Dec 30 17:17:38 2000 GMT X-Http-User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20001207 X-Http-Proxy: 1.0 x69.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 X-MyDeja-Info: XMYDJUIDtedennison Xref: supernews.google.com comp.lang.ada:3469 Date: 2000-12-30T17:17:38+00:00 List-Id: In article <3A4DED82.C23CDB77@acm.org>, Marin David Condic wrote: > straightforward to use Text_IO.Get_Line. That should discard anything > longer than your string buffer. If the input is shorter than your Uhhh....no, I don't think so. If Last = Buffer'last, then there is more input from the same line, and Get_Line needs to be called again to read it. (This can mean that a later call to Get_Line will return with a length of 0.) For a good discussion of this, see http://www.adapower.com/lang/get_line.html If you meant that he could just pass in the maximum length buffer to Get_Line, then call Get_Line again if nessecary in a loop with a trash buffer to flush the rest of the line, then I think that would work. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/